MLB-LED-Scoreboard / mlb-led-scoreboard

An LED scoreboard for Major League Baseball :baseball:
GNU General Public License v3.0
590 stars 105 forks source link

Error at start with KeyError: 'national_broadcasts' #404

Closed smith288 closed 2 years ago

smith288 commented 2 years ago

This issue is a

Software Configuration

Expected behavior

Proceed to scoreboard

Actual behavior

Crash

Additional Information

Error

DEBUG (16:00:51): Updating schedule for 2022-08-19 16:00:51.227222 ERROR (16:00:51): Untrapped error in main! Traceback (most recent call last): File "/home/pi/mlb-led-scoreboard/main.py", line 141, in main(matrix, config) File "/home/pi/mlb-led-scoreboard/main.py", line 62, in main data = Data(config) File "/home/pi/mlb-led-scoreboard/data/init.py", line 25, in init self.current_game: Game = self.schedule.get_preferred_game() File "/home/pi/mlb-led-scoreboard/data/schedule.py", line 93, in get_preferred_game return self.__current_game() File "/home/pi/mlb-led-scoreboard/data/schedule.py", line 149, in __current_game return Game.from_ID(scheduled_game["game_id"], self.date, scheduled_game["national_broadcasts"]) KeyError: 'national_broadcasts'

ty-porter commented 2 years ago

Is this on dev?

smith288 commented 2 years ago

git branch says main

WardBrian commented 2 years ago

Main is probably main of my fork then. You will need to update mlb-statsapi to version 1.5

smith288 commented 2 years ago

Oh snap… you're right. My bad. I'll close. Thanks Brian.