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

Stats command fails in leagues with category scoring #73

Closed
DMcP89 opened this issue Oct 11, 2022 · 1 comment · Fixed by #77
Closed

Stats command fails in leagues with category scoring #73

DMcP89 opened this issue Oct 11, 2022 · 1 comment · Fixed by #77
Assignees
Labels
bug Something isn't working
Milestone

Comments

@DMcP89
Copy link
Owner

DMcP89 commented Oct 11, 2022

Describe the bug
The stats command fails to retrieve player stats when running against a NBA fantasy league

To Reproduce
Steps to reproduce the behavior:

  1. Install and configure harambot with a yahoo NBA fantasy leauge
  2. Add harambot to your discord server
  3. run $stats Lebron James
  4. See logs
2022-10-11T04:51:53.679349+00:00 app[worker.1]: Error while fetching player details for player: Lebron James in league 15944
2022-10-11T04:51:53.679371+00:00 app[worker.1]: Traceback (most recent call last):
2022-10-11T04:51:53.679371+00:00 app[worker.1]:   File "/app/harambot/yahoo_api.py", line 82, in get_player_details
2022-10-11T04:51:53.679372+00:00 app[worker.1]:     embed.add_field(name="Total Points", value=player['player_points']['total'])
2022-10-11T04:51:53.679372+00:00 app[worker.1]: KeyError: 'player_points'

Expected behavior
Player stat card returned

@DMcP89 DMcP89 added the bug Something isn't working label Oct 11, 2022
@DMcP89 DMcP89 added this to the 0.3.0-Beta milestone Oct 11, 2022
@DMcP89 DMcP89 self-assigned this Oct 11, 2022
@DMcP89 DMcP89 changed the title Stats command fails with NBA leagues Stats command fails in leagues with category scoring Oct 21, 2022
@DMcP89 DMcP89 linked a pull request Nov 1, 2022 that will close this issue
@DMcP89
Copy link
Owner Author

DMcP89 commented Nov 1, 2022

Fixed in #77 merged to 0.3.0-Beta branch

@DMcP89 DMcP89 closed this as completed Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant