bder222/NBA-scoreboard

Updating .json Files

Closed this issue · 8 comments

First of all, thanks for posting all this on GitHub. So I've got the board working but for some reason the .json files do not update on reboot. When I look at the files, it looks like the data is from 1/23/2021, and that is what is being displayed on the matrix. I've been looking through the code to see what the issue could be, but I am not too savvy at python. Any idea what could be the issue?

tempImagem7hT2X

Looks like I had the wrong path in the file handler script, I just updated the script in the repository so you can try to clone it again. If you don’t want to clone it you can change the following in the NBA_File_Handler.py script in line 10:

self.path = /home/pi/NBA-scoreboard/

You can also try to execute the NBAData.py script after boot to see if it throws an error. Let me know if this works for you!

The spread data also has the same issue that has been corrected on the repository. Line 8 in NBASpreads.py was changed to

self.path = /home/pi/NBA-scoreboard/NBASpreads.json

Yep that worked, thanks!

Also in your "README:Usage" you are missing a '-' for the NBA-scoreboard directory (@reboot sleep 20; sudo python3 /home/pi/NBAscoreboard/NBA_Data.py).

Lastly, I've figured out how to add the betting lines to live games, do you think you'd be able to add the betting lines on games that have gone final? Or point me in the right direction?

Awesome! Thanks for pointing out the error on the README.usage, it should be updated now. Are you thinking it would display live game odds during the game and then once it goes final, it would go back to displaying the pre-game odds?

Exactly! Just to see which team covered and whether it went over or under.

I think this should be easy to do, I can make a version where you can toggle a variable to enable or disable live scores. I'll let you know when I have that done, should be in the next couple days.

I think I have a working version that will provide live game odds during a game and display pre-game odds once the game is final. It faulted out a couple nights ago and I couldn't catch the issue, but it's been running for 36 hours now without any issues. In the NBA_Render.py file, disp_live_odds in line 29 will toggle this feature. I'm hoping to make a config file in the future for toggling features like that.

Thank you! Ill take a look at it

Issue specific to json files not updating has been resolved.