Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for season 2011-2012 #6

Open
nicofisch5 opened this issue Sep 28, 2017 · 1 comment
Open

Error for season 2011-2012 #6

nicofisch5 opened this issue Sep 28, 2017 · 1 comment

Comments

@nicofisch5
Copy link

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

@wildbill9188
Copy link

wildbill9188 commented Jan 9, 2018

Just change the months in the nab.py file (line 117) to reflect those in which games were actually played. This is probably causing the current-season issue someone else raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants