seemethere / nba_py

Python client for NBA statistics located at stats.nba.com
BSD 3-Clause "New" or "Revised" License
1.05k stars 256 forks source link

Errors running example_game #63

Closed combinexnick closed 7 years ago

combinexnick commented 7 years ago

Noob here, quick question. Just downloaded repo and followed setup instructions (also ran setup.py build and setup.py install) and ran game_example.py to check it out. I'm able to successfully print out data from game.PlayByPlay, game.Boxscore, game.BoxscoreSummary, and game.PlayerTracking. However when I try to print data from game.BoxscoreScoring, game.BoxscoreUsage, game.BoxscoreMisc, game.BoxscoreAdvanced, or game.BoxscoreFourFactors I get a list index out of range error.

Seemingly it's only the functions with the "sql" prefix that won't work. Did I miss something in the setup? Sorry if there's an obvious answer here. Anyways, love what you are developing here. Thanks!

seemethere commented 7 years ago

Can you give me an example of the exact thing you are trying to run?

combinexnick commented 7 years ago

For example:

bss = game.BoxscoreScoring('0041400122') print(bss.sql_team_scoring())

Then I'll get a list index out of range error from this line in _init_.py:

headers = json_inp['resultSets'][ndx]['headers']

seemethere commented 7 years ago

I see where the problem is, fix is on its way