mikemountain / fantasy-football-scoreboard

Display the score of your fantasy football team on a Raspberry Pi driven RGB LED matrix for maximum ease of disappointment
GNU General Public License v3.0
63 stars 9 forks source link

NameError: global name 'matchup_info' is not defined #21

Closed tjhall9 closed 3 years ago

tjhall9 commented 3 years ago

Getting the following traceback upon running sudo python main.py --led-gpio-mapping=adafruit-hat --led-cols 64

INFO (22:57:16): Sleeper FF Scoreboard - v0.0.5 (64x32) INFO (22:57:17): getting teams INFO (22:57:18): getting avatars INFO (22:57:20): render draft info INFO (22:57:20): 459797164151795712 INFO (22:57:20): getting draft INFO (22:57:20): getting list of players uh oh? Traceback (most recent call last): File "main.py", line 29, in MainRenderer(matrix, data).render() File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 35, in render self.__render_draft() File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 76, in __render_draft self.data.refresh_draft() File "/home/pi/fantasy-football-scoreboard/data/data.py", line 60, in refresh_draft self.draft = sleeper.get_draft(self.league_id) File "/home/pi/fantasy-football-scoreboard/data/sleeper_api_parser.py", line 132, in get_draft return matchup_info NameError: global name 'matchup_info' is not defined

I just created a league with only myself in it, nothing yet scheduled. Could this be why it's throwing errors or did Sleeper break the API during the offseason?

mikemountain commented 3 years ago

I'm thinking it's due to the schedule not being set yet, I'll take a look when I'm able to and will make a fix. Thanks!

On Sun., Jul. 25, 2021, 6:00 p.m. tjhall9, @.***> wrote:

Getting the following traceback upon running sudo python main.py --led-gpio-mapping=adafruit-hat --led-cols 64

INFO (22:57:16): Sleeper FF Scoreboard - v0.0.5 (64x32) INFO (22:57:17): getting teams INFO (22:57:18): getting avatars INFO (22:57:20): render draft info INFO (22:57:20): 459797164151795712 INFO (22:57:20): getting draft INFO (22:57:20): getting list of players uh oh? Traceback (most recent call last): File "main.py", line 29, in MainRenderer(matrix, data).render() File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 35, in render self.__render_draft() File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 76, in __render_draft self.data.refresh_draft() File "/home/pi/fantasy-football-scoreboard/data/data.py", line 60, in refresh_draft self.draft = sleeper.get_draft(self.league_id) File "/home/pi/fantasy-football-scoreboard/data/sleeper_api_parser.py", line 132, in get_draft return matchup_info NameError: global name 'matchup_info' is not defined

I just created a league with only myself in it, nothing yet scheduled. Could this be why it's throwing errors or did Sleeper break the API during the offseason?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikemountain/fantasy-football-scoreboard/issues/21, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY2XVXOX6D4ATJRM2P6CHTTZSCPRANCNFSM5A66DG2A .

morpherios commented 3 years ago

Just wanted to chime in that I also get this error, and it's in a league in which the draft is completed and the schedule is set up.

morpherios commented 3 years ago

Unless I'm doing something wrong (I ran a git pull and bash update.sh) I'm still getting the same error with matchup info. Happens both with am already drafted league and a predraft league

mikemountain commented 3 years ago

@morpherios can you post the output when you run main.py?

morpherios commented 3 years ago

I am a rather complete moron. I figured it out. Had to rename config.json so the pull would complete. If you remember from last year I kinda suck at this.