mikemountain / nfl-led-scoreboard Goto Github PK
View Code? Open in Web Editor NEWNFL LED scoreboard! This project can display live scores of your favourite football teams!
License: GNU General Public License v3.0
NFL LED scoreboard! This project can display live scores of your favourite football teams!
License: GNU General Public License v3.0
I just installed the nfl board on a new raspberry pi and this is the error I get using this argument in terminal
sudo python main.py --led-gpio-mapping=regular --led-cols=64 --led-rows=32 --led-brightness=60 --led-slowdown-gpio=2
Here is the ERROR:
File "/home/pi/nfl-led-scoreboard/main.py", line 6, in
from data.data import Data
File "/home/pi/nfl-led-scoreboard/data/data.py", line 3, in
import nfl_api_parser as nflparser
ModuleNotFoundError: No module named 'nfl_api_parser'
Great project! With the season over, it'll prob. go dormant for a bit but wondering if you'd be interested in some more pixel-perfect/accurate logos for teams? The blur on the Eagles logo jumped out at me and was thinking maybe doing some small scale (like the link below - from a BoardGameGeek microbadge) might be a good fit if tweaked.
I believe this is what was done for the NHL board.
From the code, it looks like you resize to 19x19 - is that for everything, only certain boards, etc?
Hi, just struggling getting my scoreboard setup after the updates.
/ _/ / / / / / _
\ / / / / / // / /
/// // _/_/
1.5.0
Traceback (most recent call last):
File "nhl_setup.py", line 1605, in
File "nhl_setup.py", line 1518, in main
PermissionError: [Errno 13] Permission denied: 'config/.default/firstrun'
[1130] Failed to execute script nhl_setup
pi@raspberrypi:~/nhl-led-scoreboard $
basically that is what i am getting when i try to run setup.
had it working before and i dont think my up date went well. and scoreboard boots it doesnt do anything. can get the test screen "HELLO WORLD" to work though
any help is appreciated
thank you
@mikemountain or anyone
Where is the setting to rotate the game. I currently have this in the config.json
{
"preferred": {
"teams": ["PHI", "DAL", "WASH", "NYG"]
},
"rotation": {
"enabled": true,
"only_preferred": false,
"rates": {
"live": 15.0,
"final": 10.0,
"pregame": 10.0
},
"while_preferred_team_live": {
"enabled": false,
"during_halftime": false
}
},
"scrolling_speed": 2,
"use_helmet_logos": false,
"debug": "true"
}
BUT I CANT GET THE GAMES TO ROTATE LIKE THEY NORMALLY DO.
During the software install I received the error I pasted below. I believe it may have something to do with the step installing git python-pip. When I went to install it I got a message saying python-pip is not available and that I should install python3-pip instead. I followed the same step but with adding the 3 and successfully installed python3. Once I continued down the steps I received the error pasted below during the "sudo ./install.sh" command. I tried wiping and reinstalling to no avail. I am pretty new to DIY electronics so apologies if it is something simple I overlooked.
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/pi/nfl-led-scoreboard/matrix/bindings/python/setup.py'"'"'; f
ile='"'"'/home/pi/nfl-led-scoreboard/matrix/bindings/python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r
\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps
cwd: /home/pi/nfl-led-scoreboard/matrix/bindings/python/
Complete output (160 lines):
running develop
running egg_info
writing rgbmatrix.egg-info/PKG-INFO
writing dependency_links to rgbmatrix.egg-info/dependency_links.txt
writing top-level names to rgbmatrix.egg-info/top_level.txt
reading manifest file 'rgbmatrix.egg-info/SOURCES.txt'
writing manifest file 'rgbmatrix.egg-info/SOURCES.txt'
running build_ext
building 'core' extension
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protecto
r-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -W
date-time -D_FORTIFY_SOURCE=2 -fPIC -I../../include -I/usr/include/python3.9 -c rgbmatrix/core.cpp -o build/temp.linux-armv7l-3.9/rgbmatrix/core.o -O3 -Wall
rgbmatrix/core.cpp: In function ‘PyObject* PyInit_core()’:
rgbmatrix/core.cpp:8633:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
8633 | __pyx_type_9rgbmatrix_4core_Canvas.tp_print = 0;
| ^~~~~~~~
rgbmatrix/core.cpp:8644:43: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
8644 | __pyx_type_9rgbmatrix_4core_FrameCanvas.tp_print = 0;
| ^~~~~~~~
rgbmatrix/core.cpp:8655:41: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
8655 | __pyx_type_9rgbmatrix_4core_RGBMatrix.tp_print = 0;
| ^~~~~~~~
rgbmatrix/core.cpp:8661:48: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
8661 | __pyx_type_9rgbmatrix_4core_RGBMatrixOptions.tp_print = 0;
| ^~~~~~~~
In file included from /usr/include/python3.9/unicodeobject.h:1026,
from /usr/include/python3.9/Python.h:97,
from rgbmatrix/core.cpp:4:
rgbmatrix/core.cpp: In function ‘int __Pyx_ParseOptionalKeywords(PyObject*, PyObject***, PyObject*, PyObject**, Py_ssize_t, const char*)’:
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
261 | PyUnicode_WSTR_LENGTH(op) :
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9039:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9039 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE PyUnicode_AsUnicode(PyObject)’ is deprecated [-Wdeprecated-declarations]
262 | ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
| ^
rgbmatrix/core.cpp:9039:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9039 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
264 | PyUnicode_WSTR_LENGTH(op)))
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9039:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9039 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
261 | PyUnicode_WSTR_LENGTH(op) :
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9039:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9039 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE PyUnicode_AsUnicode(PyObject)’ is deprecated [-Wdeprecated-declarations]
262 | ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
| ^
rgbmatrix/core.cpp:9039:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9039 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
264 | PyUnicode_WSTR_LENGTH(op)))
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9039:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9039 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
261 | PyUnicode_WSTR_LENGTH(op) :
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9055:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9055 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE PyUnicode_AsUnicode(PyObject)’ is deprecated [-Wdeprecated-declarations]
262 | ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
| ^
rgbmatrix/core.cpp:9055:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9055 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
264 | PyUnicode_WSTR_LENGTH(op)))
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9055:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9055 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
261 | PyUnicode_WSTR_LENGTH(op) :
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9055:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9055 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE PyUnicode_AsUnicode(PyObject)’ is deprecated [-Wdeprecated-declarations]
262 | ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
| ^
rgbmatrix/core.cpp:9055:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9055 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject)’ is deprecated [-Wdeprecated-declaratio
ns]
451 | #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject)op)
| ^
/usr/include/python3.9/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
264 | PyUnicode_WSTR_LENGTH(op)))
| ^~~~~~~~~~~~~~~~~~~~~
rgbmatrix/core.cpp:9055:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
9055 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/pi/nfl-led-scoreboard/matrix/b
indings/python/setup.py'"'"'; file='"'"'/home/pi/nfl-led-scoreboard/matrix/bindings/python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file
__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full co
mmand output.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
This one is not a big deal. I've tested a number of fonts with the nhl and mlb scoreboards and have been unsuccessful with finding a nice readable font for the numbers and letters. The 3's 6's 9's 4's and numerous letters are hard to read without a double take. Has anyone had much luck with a different font other than "04b24.otf". aka 04B_24__.TTF i believe. Any successes out there with a different font?
Hey, found your project from the NHL and MLB ones. Was searching for something to base my own project off of to have something for a super bowl party.
You seem fairly early on, would you like a hand with the development? Figured it would make sense to coordinate if you do.
After a bit of back and forth, i've gotten to a point where everything seems to work as it should and i'am very happy with the result.
The only issue i'm having, is that none of the animations are showing. Unfortunatly i was not able to see the terminal during the last games so im not sure if its giving me any helpful error messages when trying to load an animation. is there any known issues or common mistakes, maybe just a missing flag or something like this?
Thanks.
Have a setting on Config that makes the board only cycle through live games.
For instance, with Monday Night football. I have to change my favorite team to a team that is playing for it to not cycle through Sunday's games.
So essentially whenever there is a live game(regardless if it's a favorite team or not), you will only see those games. Not any finished games or games that will be starting later on that day.
Just wondering if there was a 64x64 board option.
with the new rotate branch fork, I see this:
"while_preferred_team_live": {
"enabled": false,
"during_halftime": false
Not sure exactly what is supposed to happen when this is enabled to true? I assume that your favorite team will be displayed live when its live? Also not sure how to set your favorite team anymore since the config.json changed a little. You used to be able to set favorite team like this;
at config.json
{
"fav_team": "WSH",
"debug": "false"
}
Just now doing this project. Is it normal that the LED stays blank during the off-season?
Can you put what commands need to be run to update the NFL scoreboard in the readme?
I am using the f/rotate games fork.
When the rotation is set to “true” and the only preferred is set to “false”, and the while preferred team live is set to “false” it does not display the correct team. My preferred team are Texas, and Green Bay, it is currently displaying the chargers and broncos and not GB.
Script used to launch the matrix:
sudo python main.py --led-gpio-mapping="adafruit-hat-pwm" --led-brightness=40 --led-slowdown-gpio=2 --led-cols 64
config.json
{
"preferred": {
"teams": ["TX", "GB"]
},
"rotation": {
"enabled": true,
"only_preferred": false,
"rates": {
"live": 15.0,
"final": 10.0,
"pregame": 10.0
},
"while_preferred_team_live": {
"enabled": false,
"during_halftime": true
}
},
"scrolling_speed": 2,
"use_helmet_logos": true,
"debug": "true"
}
Is your feature request related to a problem? Please describe.
No. This could enhance validation and board management for users.
Describe the solution you'd like
Schema file would define required config.json settings with NFL board settings. Could be expanded to validate similar to NHL board.
Describe alternatives you've considered
Schema could be provided with led-board-manager
. Adding to NFL project would make it available for validators and as a reference for the config.json.
Additional context
I've generated a schema for the config that would allow easy integration to manage boards and generate config forms in the led-board-manager
app. This does not affect the core in any way and future features added to this schema would dynamically update any added validation as well as user forms for config generation/validation and hot-swapping boards.
No harm no foul if you'd like to exclude it. Or let me know, and I could look into adding config validation. See also PR #25.
Cheers!
Traceback (most recent call last):
File "main.py", line 6, in
from data.data import Data
File "/home/pi/nfl-led-scoreboard/data/data.py", line 3, in
import nfl_api_parser as nflparser
ModuleNotFoundError: No module named 'nfl_api_parser'
This is the error message being returned. Any clue what this is?
Just wondering if there is any problem running the script on the 128 x 64 screen. I tried to run it with this
sudo python main.py --led-gpio-mapping=adafruit-hat-pwm --led-cols=128 --led-rows=64 --led-panel-type=FM6126B --led-rgb-sequence=BGR --led-row-addr-type=3
here's the output, just seemed to pop up recently: not sure how to fix this...
INFO (18:31:13): NFL Scoreboard - v0.0.1 (64x32)
INFO (18:31:15): Final State, waiting 6 hours
Traceback (most recent call last):
File "main.py", line 30, in
MainRenderer(matrix, data).render()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 29, in render
self.__render_game()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 54, in __render_game
self._draw_post_game()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 257, in _draw_post_game
awaysize = self.screen_config.team_logos_pos[overview['awayteam']]['size']
KeyError: u'AFC'
Describe the bug
After updating to the latest version the scoreboard doesn't display on the matrix board. I have NHL and MLB scoreboards on the same pi and those work fine. When I run from terminal I get a normal status message, whether it be for a game in progress or a game that's ended. I'm on a pi4.
Wasn't even thinking about it when it happened, but had to get new Router, so have a new name and password. I currently cannot connect to the wifi portion due to the name and password change.
Am I screwed, or can I adjust it in the code on the micro sd card? Is there another way to connect? I guess I am confused, unless I can find/change in the hardcode, I am guessing I may have to reset the card and do everything from scratch once again?!
I'm getting the following error:
Traceback (most recent call last): File "main.py", line 30, in MainRenderer(matrix, data).render()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 29, in render self.__render_game() File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 36, in __render_game self._draw_pregame() File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 110, in _draw_pregame date_text = gametime.strftime('%A').upper() UnboundLocalError: local variable 'gametime' referenced before assignment
I just cloned the repo within the last day and received this error. Any suggestions on what I can do?
so the way it used to work was, with just one game always running, could easily track the changes in score. now with rotations, that's kinda been removed, so I gotta re-figure it out
A lot of leagues are playing with league median now, would love to have this on screen in small text between the logos.
Might try to attempt this myself but haven't done much API work yet so no promises.
Hi,
I getting an error when i try to execute the program.
sudo python main.py --led-gpio-mapping=adafruit-hat
INFO (17:03:07): NFL Scoreboard - v0.0.0a (64x32)
INFO (17:03:09): Scheduled State, waiting 12h
Traceback (most recent call last):
File "main.py", line 30, in
MainRenderer(matrix, data).render()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 33, in render
self.__render_game()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 40, in __render_game
self._draw_pregame()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 123, in _draw_pregame
home_team_logo_pos = self.screen_config.team_logos_pos[overview['hometeam']]['prehome']
KeyError: 'prehome'
Is your feature request related to a problem? Please describe.
No, the project currently works as expected (thanks!). Just wanted to put in an enhancement request.
Describe the solution you'd like
A rotation through that day's scheduled NFL games, much like the NHL scoreboard. I'm assuming branching out to show the Thurs and Mon scores might be a bit difficult, but would be great plus to have. Not sure if the API score pull source automatically changes over when the new week begins.
Describe alternatives you've considered
Configuration wise, I'm thinking this would need to be a flag or something set in the config.json file to enable rotation. Maybe like 'fav team = ALL' meaning rotate through displaying all teams? Or two additional entries for 'rotation = true' and 'time = 15' which enables the rotation code and allows a customization how long each game is displayed before transitioning to the next game to display (like the MLB scoreboard). Not sure if the NHL rotation code is easily accessible or how simple it would be to change/add this feature.
Additional context
Love what has been done so far and I know this will be a work in progress all season. Just wanted to put in a enhancement request which I hope is being considered to be added down the road. Thanks doing this. Made watching the Pack stomp my Vikes a little better with this NFL scoreboard display.
Is your feature request related to a problem? Please describe.
like 95% of the logos look like shit
Describe the solution you'd like
make them look less shit
Describe alternatives you've considered
there's no alternative
Additional context
I know how to do it, I just haven't gotten around to it yet because it requires photoshop, but I'll get around to it by week 2. just putting this in to track things
Super cool project, looking forward to having it up all season. Had it up for last nights game, but the touchdown animation appears to be broken. Any thoughts?
Scoreboard has been working great. No changes, but suddenly started throwing "list index out of range"
sudo python main.py --led-gpio-mapping=adafruit-hat-pwm --led-brightness=60 --led-slowdown-gpio=2
INFO (09:26:09): NFL Scoreboard - v1.0.0 (64x32)
Traceback (most recent call last):
File "main.py", line 30, in
MainRenderer(matrix, data).render()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 32, in render
self.__render_game()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 41, in __render_game
self.__draw_game(self.data.current_game())
File "/home/pi/nfl-led-scoreboard/data/data.py", line 79, in current_game
return self.games[self.current_game_index]
IndexError: list index out of range
Running on a Pi 3B, 64x32 display, and a piHat ..
Any thoughts ?
I followed the instructions and when I run the command to start the board, I get the following errors:
~/nfl-led-scoreboard $ sudo python main.py --led-gpio-mapping=adafruit-hat
Traceback (most recent call last):
File "main.py", line 2, in
from data.scoreboard_config import ScoreboardConfig
File "/home/pi/nfl-led-scoreboard/data/scoreboard_config.py", line 1, in
from utils import get_file
File "/home/pi/nfl-led-scoreboard/utils.py", line 7, in
from tzlocal import get_localzone
ImportError: No module named tzlocal
Also. with other projects I have had to use python3 instead of python. when I try python3 I get this error:
~/nfl-led-scoreboard $ sudo python3 main.py --led-gpio-mapping=adafruit-hat
Traceback (most recent call last):
File "main.py", line 6, in
from data.data import Data
File "/home/pi/nfl-led-scoreboard/data/data.py", line 3, in
import nfl_api_parser as nflparser
ModuleNotFoundError: No module named 'nfl_api_parser'
I also have the NHL board running on the same pi. I don't know if that has something to do with it
Noticed during the Steeler game today (Dec 7) that it wasn't working. Did some digging and found you have Washington's logo and formatting under WAS and it needs to be WSH according to ESPN's API data.
Great job on this. Added some code on my own to display the red zone animation at Heinz Field:
https://twitter.com/scicco21/status/1331799516857708544?s=20
Despite the horrible loss today...go Steelers!
For some reason it seems like data.py isn't able to import nfl_api_parser when I run main.py
I have installed the NHL and other programs like this before and not had an issue. Have you seen this before?
sudo python main.py --led-gpio-mapping=ada fruit-hat-pwm --led-brightness=60 --led-slowdown-gpio=2
/home/pi/nfl-led-scoreboard/renderer/main.py:365: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while x is not 3:
/home/pi/nfl-led-scoreboard/renderer/main.py:377: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while x is not 3:
/home/pi/nfl-led-scoreboard/renderer/main.py:398: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while x is not 3:
Traceback (most recent call last):
File "/home/pi/nfl-led-scoreboard/main.py", line 6, in
from data.data import Data
File "/home/pi/nfl-led-scoreboard/data/data.py", line 3, in
import nfl_api_parser as nflparser
ModuleNotFoundError: No module named 'nfl_api_parser'
For some reason it shows the game on Sunday Morning as today, even though it's Saturday night.
Running with sudo ... &
, program will stay on the pregame screen until the script is restarted manually, same things happen postgame where the final score didn't appear until manual restart. Would love to leave it running and have it automatically transition between states without user input.
Updating 8f324fa..40d0d0e
error: Your local changes to the following files would be overwritten by merge:
config.json
Please commit your changes or stash them before you merge.
Aborting
if i try and git stash i get this
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'pi@football.(none)')
Cannot save the current index state
I may have figured out a way to get game odds from ESPN. This works but it's slow and may need to be improved.
in the nfl_api_parser.py add:
def get_moneyline_odds(game_id):
url = f"http://sports.core.api.espn.com/v2/sports/football/leagues/nfl/events/{game_id}/competitions/{game_id}/odds"
# Make the API request
response = requests.get(url)
# Check if the request was successful (status code 200)
if response.status_code == 200:
# Parse the JSON data
data = response.json()
# Navigate through the structure to access awayTeamOdds for the first item (index 0)
items = data.get("items", [])
if items:
first_item = items[0]
away_team_odds = first_item.get("awayTeamOdds", {})
home_team_odds = first_item.get("homeTeamOdds", {})
# Extract relevant information from awayTeamOdds
away_moneyline = away_team_odds.get("moneyLine", "N/A")
away_ML = f"+{away_moneyline}" if away_moneyline >= 0 else str(away_moneyline)
# Extract relevant information from homeTeamOdds
home_moneyline = home_team_odds.get("moneyLine", "N/A")
home_ML = f"+{home_moneyline}" if home_moneyline >= 0 else str(home_moneyline)
# Return the moneyline odds for both away and home teams
return away_ML, home_ML
else:
print("No items in the response.")
else:
print(f"Request failed with status code: {response.status_code}")
def get_all_games():
# for i in range(5):
try:
res = requests.get(URL)
res = res.json()
games = []
# i = 0
for g in res['events']:
info = g['competitions'][0]
game_id = g['id']
# Fetch the moneyline odds for the current game
away_moneyline, home_moneyline = get_moneyline_odds(game_id)
game = {'id': game_id, 'name': g['shortName'], 'date': g['date'],
'hometeam': info['competitors'][0]['team']['abbreviation'], 'homeid': info['competitors'][0]['id'], 'homescore': int(info['competitors'][0]['score']),
'awayteam': info['competitors'][1]['team']['abbreviation'], 'awayid': info['competitors'][1]['id'], 'awayscore': int(info['competitors'][1]['score']),
'down': info.get('situation', {}).get('shortDownDistanceText'), 'spot': info.get('situation', {}).get('possessionText'),
'time': info['status']['displayClock'], 'quarter': info['status']['period'], 'over': info['status']['type']['completed'],
'redzone': info.get('situation', {}).get('isRedZone'), 'possession': info.get('situation', {}).get('possession'), 'state': info['status']['type']['state'],
'away_moneyline': away_moneyline,'home_moneyline': home_moneyline}
games.append(game)
# i += 1
# print(away_moneyline, home_moneyline)
return games
except requests.exceptions.RequestException as e:
print("Error encountered getting game info, can't hit ESPN api, retrying")
# if i < 4:
# t.sleep(1)
# continue
# else:
# print("Can't hit ESPN api after multiple retries, dying ", e)
except Exception as e:
print("something bad?", e)
And then add the text results for the "away_moneyline, home_moneyline" to the pre-game renderer.
This works but it slows down the script, so it might need a loading text or image. Or maybe the code can be optimized.
With preseason starting tonight, has anyone fired up their board? Does it work? I'm trying to get mine going and keep getting errors.
Side question - is there a slack channel to post questions like these?
I cant seem to get the scoreboard working. I originally had issues with the ledmatrix repository and was able to fix that by downloading the mlb scoreboard to get the right python3 files i needed. Then I ran into the no API data which someone posted a fix for recently.
I now have an error at the end that just says OSError: cannot open resource. The screen blips with 2 LED's when I run the program but then nothing. Any ideas?
Can you clarify what's required to get the games to rotate? I can only get the display to show one game per slate.
I haven't been able to get the led board to light up on initial install, following the documentation provided.
I first tried adding NFL to the same pi as my working MLB, then once I installed the NFL board, MLB stopped working also. I then tried on a fresh pi OS to isolate NFL, and still was not able to light up the board.
My board shows the countdown for the last hour until kick-off but the kick-off is in 3 hours.
In the hzeller rpi-rgb-led-matrix there is a flag for other panel types. I have a different panel type and I can get the panel to work in the official hzeller code but not for the scoreboard.
--led-panel-type | Chipset of the panel. In particular if it doesn't light up at all, you might need to play with this option because it indicates that the panel requires a particular initialization sequence. |
---|
File "main.py", line 25, in config = ScoreboardConfig("config", args) File "/home/pi/nfl-led-scoreboard/data/scoreboard_config.py", line 8, in init
json = self.__get_config(filename_base)
File "/home/pi/nfl-led-scoreboard/data/scoreboard_config.py", line 29, in __get_config
reference_config = self.read_json(filename)
File "/home/pi/nfl-led-scoreboard/data/scoreboard_config.py", line 22, in read_json
j = json.load(open(path))
File "/usr/lib/python2.7/json/init.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 367, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 2 column 15 - line 5 column 1 (char 15 - 46)
I just got this error after the update.
Describe the bug
I am trying to run the start up command and getting the ImportError: No module named tzlocal
I have double checked my timezone is set up on my end locally and all that. I reinstalled everything and still get the same error.
To Reproduce
Steps to reproduce the behavior:
I use start up code sudo python main.py --led-gpio-mapping=aduafruit-hat-pwm --led-brightness=75 --led-slowdown-gpio=2
Even just the basic sudo python main.py, but non the less it just says No module named tzlocal.
Did I miss something in the install or code that I need to deliberately go in and change myself?
Getting a ModuleNotFoundError: No module named 'rgbmatrix'
when I run the main.py script.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
got a weird one here, so it displays the game Saturday for 1:05PM for IND vs BUF , but my favorite team is set to WSH - which did work vs the iggles last week. Why would it display the wrong teams for the preview of the next weeks' game?
Is your feature request related to a problem? Please describe.
No, just an idea based on the customization ability of MLB scoreboard
Describe the solution you'd like
Ability for custom colors on the score board mainly:
Additional Customization:
3. Quarter
4: Time
5. Down and Distance
6. Ball Yardline (this could also potentially change to Red in the readzone)
Just random thoughts Ive had while watching the games between live and the board.
Since about a week, when ever i try to run the main.py i get this error:
Traceback (most recent call last):
File "/home/pi/nfl-led-scoreboard/main.py", line 30, in <module>
MainRenderer(matrix, data).render()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 32, in render
self.__render_game()
File "/home/pi/nfl-led-scoreboard/renderer/main.py", line 41, in __render_game
self.__draw_game(self.data.current_game())
File "/home/pi/nfl-led-scoreboard/data/data.py", line 79, in current_game
return self.games[self.current_game_index]
IndexError: list index out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.