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

Fix scoreboard stuck in off day #440

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ebrucker406
Copy link

@ebrucker406 ebrucker406 commented Jan 3, 2024

Updates get_score_details call in data.py to have 2 character month and date. This fixes the issue that cause the scoreboard to be stuck in off day mode.

@ebrucker406 ebrucker406 changed the title Fix get_score_details call Fix scoreboard stuck in off day Jan 4, 2024
@angtang10
Copy link

Could someone please provide some more details to these instructions? I looked through the sd card files and tried to open up the files on putty but am lost. Where do you find "data.py"? And is it a simple change to the calendar settings? Just trying to get all the info so I bother in one post, not multiple! Thanks in advance!

@pjockey
Copy link

pjockey commented Jan 5, 2024

OK, I'm not a Putty guy and do everything using ssh. The data.py file is located in the /home//nhl-led-scoreboard/src/data. My is pi so change your user name accordingly. So, cd nhl-led-scoreboard/src/data from the home directory. Then nano data.py and the file should open. Scroll down to the line that starts with data = nhl_api.data.get_score.details.............

The line you want is 288 in the file I have, change what is there with the noted fix, or copy and paste this into line 288 after you remove the current line 288.

data = nhl_api.data.get_score_details("{}-{}-{}".format(str(self.year), str(self.month).zfill(2), str(self.day).zfill(2)))

Hope this helps.

@angtang10
Copy link

OK, I'm not a Putty guy and do everything using ssh. The data.py file is located in the /home//nhl-led-scoreboard/src/data. My is pi so change your user name accordingly. So, cd nhl-led-scoreboard/src/data from the home directory. Then nano data.py and the file should open. Scroll down to the line that starts with data = nhl_api.data.get_score.details.............

The line you want is 288 in the file I have, change what is there with the noted fix, or copy and paste this into line 288 after you remove the current line 288.

data = nhl_api.data.get_score_details("{}-{}-{}".format(str(self.year), str(self.month).zfill(2), str(self.day).zfill(2)))

Hope this helps.

Amazing! Thank you so much. It's working now :)

@ebrucker406 ebrucker406 force-pushed the fix-get_score_details branch from 5831d73 to 3f73698 Compare January 24, 2024 20:45
@angtang10
Copy link

Is there a way to get the scoreboard to stay with this new code? I don't keep my scoreboard on 24/7 so when I try starting it up, I have to recode it every single time. Maybe I'm not saving it right? Thank you in advance!

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

Successfully merging this pull request may close these issues.

3 participants