Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

KeyError: 'totalGames' #1

Closed
jordanrvillarreal opened this issue Oct 25, 2019 · 2 comments
Closed

KeyError: 'totalGames' #1

jordanrvillarreal opened this issue Oct 25, 2019 · 2 comments

Comments

@jordanrvillarreal
Copy link

Running into an error.

INFO (16:33:26): NHL Scoreboard - v0.1.0 (64x32)
http://statsapi.web.nhl.com/api/v1/schedule?teamId=None
Traceback (most recent call last):
File "main.py", line 28, in
data = Data(config)
File "/home/pi/nhl-led-scoreboard/data/data.py", line 30, in init
self.refresh_fav_team_status()
File "/home/pi/nhl-led-scoreboard/data/data.py", line 56, in refresh_fav_team_status
self.fav_team_game_today = nhlparser.check_if_game(self.fav_team_id)
File "/home/pi/nhl-led-scoreboard/data/nhl_api_parser.py", line 189, in check_if_game
game = game_data["totalGames"]
KeyError: 'totalGames'

Trying to step through it on my own but not much success just yet.

riffnshred added a commit that referenced this issue Oct 26, 2019
Fix the condition where if the user dont put any team's ID in arguments it would not pick up the default ID from config
@riffnshred
Copy link
Owner

Fixed it. Update it and let me know if it works for you.

@jordanrvillarreal
Copy link
Author

Works! Can't wait to see where you go with this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants