basketball_reference
basketball_reference copied to clipboard
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
I'm encountering the same issue for this season. Did you ever identify/resolve the issue?
Was there ever any resolution for this problem?
Similar to the issue raised w the 2011-2012 lockout season, you need to change the months in the nba.py file (line 117) to reflect those in which games have actually been played this season. My method at least