-
Notifications
You must be signed in to change notification settings - Fork 557
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
PlayerGameLogs appears to return 2016-17 data regardless of what's passed in #99
Comments
I guess I should add: as far as I can tell, this is an issue with the API endpoint itself and not this library. This may be an obvious close, but I thought it was worth pointing out that this was happening. |
What code are you trying to use? I am able to get it to work via browser for different seasons: https://stats.nba.com/player/2544/boxscores-advanced/?Season=2012-13&SeasonType=Regular%20Season |
That's boxscores advanced. I'm specifically referring to this endpoint: Using the library you can make a call like: Regardless of how you make the call, you'll get 2016-17 data. |
I figured out the issue. The endpoint for that page says that "Season" should be "SeasonYear", unfortunately it only accepts "Season" as a valid parameter. nba_api is assuming it is SeasonYear because that's what the response is indicating. You can work around this issue by doing the following: raw_data = playergamelogs.PlayerGameLogs(player_id_nullable=2544, get_request=False)
raw_data.parameters['Season'] = '2012-13'
raw_data.get_request() This will be marked as a bug and fixed in an upcoming release. Just need to find some free time. |
Fixed this issue and added PR. |
The fix needs to be implemented in the tool that analyzes endpoints instead of the file because this fix is just temporary and will be overwritten during the next version update prior to analyzing the endpoints. |
Fixed as of v1.1.8. |
Doesn't appear to matter how the call is structured, whether you're filtering to a player, a team, or trying to filter to a season. The team parameter works. The player parameter works. The season parameter does not work and the API call returns data from 2016-17 always.
This is specifically the new playergamelogs (plural) endpoint that was added this past weekend.
The text was updated successfully, but these errors were encountered: