-
Notifications
You must be signed in to change notification settings - Fork 222
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
KeyError: 'stats' in player.py #603
Comments
Maybe change this?
into
|
UPDATE: Nevermind... My unittests were just called in a different order. The issue still persists, it just comes up later in the test suite and I was too fast writing this message. |
Seems to be similar to this issue: https://github.com/cwendt94/espn-api/pull/591/files So changing |
Yeah, that works fine for me locally, PR incoming |
hi guys, when is this commit merged and usable? thanks! |
I'm experiencing this issue too |
Same, hope this issue will be fixed soon! |
Even when my PR fixes the error it's still unclear what happens datawise. It's not really a fix when there's no exception anymore but half of the data is missing. |
There doesn't seem to be data missing. This case is only happening for Bogdan Bogdaovich, Dejounte Murray, and Immanuel Quickly. They all played the 1st game of the season and have missed since, so their "Last 7" stats are empty. For some reason ESPN is differently populating players who've missed part of the season, rather than the whole season. Perhaps some edge-case error they introduced in their API? |
You can also fix it locally. Go to player.py, or debug and trace it to where your player.py is located, and change line 45 to :
|
Awesome, thanks for checking that!
I just ported our Telegram bot to run as an Azure Function. There's no easy way to fix it within the function, so I guess I'll need to wait for the merge. Hooray, Cloud! |
Thanks for all the investigation! The fix has been added in v0.41.0! |
Sport
Basketball
Summary
I get a KeyError: 'stats' during the api execution. Has something changed in the api?
Logs/Data
The text was updated successfully, but these errors were encountered: