Giter Club home page Giter Club logo

basketball_reference's People

Contributors

frangoitia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basketball_reference's Issues

Syntax Error Encoding issue

After cloning, installing all the modules from requirements and trying out the first example:

(venv) dl-MacBook-Pro:basketball_reference dl$ python match_generator.py --league nba --seasons 2003-2004
Traceback (most recent call last):
  File "match_generator.py", line 7, in <module>
    from nba import NbaBRefSeason
  File "/Users/dl/nba/basketball_reference/nba.py", line 6, in <module>
    from base import BRefMatch, BRefSeason
  File "/Users/dl/nba/basketball_reference/base.py", line 78
SyntaxError: Non-ASCII character '\xe2' in file /Users/dl/nba/basketball_reference/base.py on line 78, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Should maybe include encoding at top of base.py?

Version of Python in OSx?

hi
great package
what version of Python is this for? i get the following error.

Traceback (most recent call last):
  File "match_generator.py", line 3, in <module>
    raise('Must be run in Python 3') 
TypeError: exceptions must be old-style classes or derived from BaseException, not str

Error Parsing?

The code that caused this warning is on line 49 of the file match_generator.py. To get rid of this warning, change code that looks like this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "html.parser")

  markup_type=markup_type))
Traceback (most recent call last):
  File "match_generator.py", line 49, in <module>
    b_ref.crawl_season()
  File "xxx/base.py", line 328, in crawl_season
    self._gen_matches_codes()
  File "xxx/nba.py", line 137, in _gen_matches_codes
    reg_season, post_season = seasons[0], None
IndexError: list index out of range

Did Not Dress/Not With Team

Two strings are not covered on line 49: 'Not With Team', 'Did Not Dress', that line needs to be modified to:
stat = stat if stat not in [None, 'Did Not Play', 'Not With Team', 'Did Not Dress', 'Player Suspended'] else '0.0'

IndexError w/ current season

When trying to run with the current season:

Traceback (most recent call last):
  File "match_generator.py", line 31, in <module>
    main(args.league, args.seasons)
  File "match_generator.py", line 22, in main
    b_ref.crawl_season()
  File "/Users/dl/nba/basketball_reference/base.py", line 333, in crawl_season
    self._gen_matches_codes()
  File "/Users/dl/nba/basketball_reference/nba.py", line 120, in _gen_matches_codes
    self._gen_month_codes(url)
  File "/Users/dl/nba/basketball_reference/nba.py", line 129, in _gen_month_codes
    reg_season, post_season = seasons[0], None
IndexError: list index out of range

timeout error on win10 due to use of sigal.SIGALRM

\GitHub\basketball_reference>python match_generator.py --league nba --seasons 2003-to-2017
Traceback (most recent call last):
File "match_generator.py", line 7, in
from nba import NbaBRefSeason
File "C:\Users\Bill\Documents\GitHub\basketball_reference\nba.py", line 6, in
from base import BRefMatch, BRefSeason
File "C:\Users\Bill\Documents\GitHub\basketball_reference\base.py", line 21, in
signal.signal(signal.SIGALRM, timeout_handler)
AttributeError: module 'signal' has no attribute 'SIGALRM'

I looked and it seems like I'm not the first person to run into this issue, but perhaps the first to run into it on this specific project. I found a fix for the same error on a similar project ( Unity-Technologies/ml-agents@4958f04 ) but I'm struggling to implement the work-around here.

Error for season 2011-2012

Hi Francisco,

When I launch the following command:
python match_generator.py --league nba --seasons 2011-2012

I get the following error:

Traceback (most recent call last):
  File "match_generator.py", line 31, in <module>
    main(args.league, args.seasons)
  File "match_generator.py", line 22, in main
    b_ref.crawl_season()
  File "/var/www/basketball_reference/base.py", line 332, in crawl_season
    self._gen_matches_codes()
  File "/var/www/basketball_reference/nba.py", line 120, in _gen_matches_codes
    self._gen_month_codes(url)
  File "/var/www/basketball_reference/nba.py", line 129, in _gen_month_codes
    reg_season, post_season = seasons[0], None
IndexError: list index out of range

I guess it is because of the lockout.

Thanks for your work.
Nicolas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.