You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm able to get everything working properly when manually running main.py from the install folder of /home/pi/mlb-led-scoreboard, but from anywhere else, including trying to run as a service, it fails. I'm just trying to automate startup at this point. It looks like it's failing to find rgbmatrix:
Aug 15 16:31:09 scoreboardpi systemd[1]: /lib/systemd/system/mlb-led-scoreboard.service:5: Unknown key name 'ExecStartPre' in section 'Unit', ignoring.
Aug 15 16:31:16 scoreboardpi systemd[1]: /lib/systemd/system/mlb-led-scoreboard.service:5: Unknown key name 'ExecStartPre' in section 'Unit', ignoring.
Aug 15 16:31:40 scoreboardpi systemd[1]: /lib/systemd/system/mlb-led-scoreboard.service:5: Unknown key name 'ExecStartPre' in section 'Unit', ignoring.
Aug 15 16:31:52 scoreboardpi systemd[1]: Started MLB LED Scoreboard.
Aug 15 16:31:52 scoreboardpi sudo[661]: root : PWD=/home/pi/mlb-led-scoreboard ; USER=root ; COMMAND=/home/pi/mlb-led-scoreboard/venv/bin/python3 /home/pi/mlb-led-scoreboar>
Aug 15 16:31:52 scoreboardpi sudo[661]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Aug 15 16:31:55 scoreboardpi main.py[662]: [2024-08-15 16:31:55] [RGBME] [ERROR]:
Aug 15 16:31:55 scoreboardpi main.py[662]: Failed to load SixelAdapter for "sixel" display adapter!
Aug 15 16:31:55 scoreboardpi main.py[662]: If this is not your configured display adapter, the emulator will continue to load.
Aug 15 16:31:55 scoreboardpi main.py[662]: You can suppress this error in the emulator_config.json by adding:
Aug 15 16:31:55 scoreboardpi main.py[662]: "suppress_adapter_load_errors": true
Aug 15 16:31:55 scoreboardpi main.py[662]: Traceback (most recent call last):
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/driver/init.py", line 32, in set_mode
Aug 15 16:31:55 scoreboardpi main.py[662]: import rgbmatrix
Aug 15 16:31:55 scoreboardpi main.py[662]: ModuleNotFoundError: No module named 'rgbmatrix'
Aug 15 16:31:55 scoreboardpi main.py[662]: During handling of the above exception, another exception occurred:
Aug 15 16:31:55 scoreboardpi main.py[662]: Traceback (most recent call last):
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/venv/lib/python3.9/site-packages/RGBMatrixEmulator/adapters/init.py", line 51, in
Aug 15 16:31:55 scoreboardpi main.py[662]: package = importlib.import_module(package_path)
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
Aug 15 16:31:55 scoreboardpi main.py[662]: return _bootstrap._gcd_import(name[level:], package, level)
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 1030, in _gcd_import
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 1007, in _find_and_load
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 986, in _find_and_load_unlocked
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 680, in _load_unlocked
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 790, in exec_module
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 228, in _call_with_frames_removed
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/venv/lib/python3.9/site-packages/RGBMatrixEmulator/adapters/sixel_adapter.py", line 5, in
Aug 15 16:31:55 scoreboardpi main.py[662]: import libsixel as sixel
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/venv/lib/python3.9/site-packages/libsixel/init.py", line 352, in
Aug 15 16:31:55 scoreboardpi main.py[662]: raise ImportError("libsixel not found.")
Aug 15 16:31:55 scoreboardpi main.py[662]: ImportError: libsixel not found.
Aug 15 16:31:58 scoreboardpi main.py[662]: [2024-08-15 16:31:58] [RGBME] [INFO]: RGBME v0.11.6 - 64x32 Matrix | 1x1 Chain | 16px per LED (SQUARE) | BrowserAdapter
Aug 15 16:31:58 scoreboardpi main.py[662]: [2024-08-15 16:31:58] [RGBME] [INFO]: Starting server...
Aug 15 16:31:58 scoreboardpi main.py[662]: [2024-08-15 16:31:58] [RGBME] [INFO]: Server started and ready to accept requests on http://localhost:8888/
I can browse to the scoreboard URL from my laptop and see that part is working fine.
My service file is as follows:
[Unit]
Description=MLB LED Scoreboard
Wants=network-online.target time-sync.target
After=network.target network-online.target time-sync.target
ExecStartPre=/bin/sleep/15
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm able to get everything working properly when manually running main.py from the install folder of /home/pi/mlb-led-scoreboard, but from anywhere else, including trying to run as a service, it fails. I'm just trying to automate startup at this point. It looks like it's failing to find rgbmatrix:
Aug 15 16:31:09 scoreboardpi systemd[1]: /lib/systemd/system/mlb-led-scoreboard.service:5: Unknown key name 'ExecStartPre' in section 'Unit', ignoring.
Aug 15 16:31:16 scoreboardpi systemd[1]: /lib/systemd/system/mlb-led-scoreboard.service:5: Unknown key name 'ExecStartPre' in section 'Unit', ignoring.
Aug 15 16:31:40 scoreboardpi systemd[1]: /lib/systemd/system/mlb-led-scoreboard.service:5: Unknown key name 'ExecStartPre' in section 'Unit', ignoring.
Aug 15 16:31:52 scoreboardpi systemd[1]: Started MLB LED Scoreboard.
Aug 15 16:31:52 scoreboardpi sudo[661]: root : PWD=/home/pi/mlb-led-scoreboard ; USER=root ; COMMAND=/home/pi/mlb-led-scoreboard/venv/bin/python3 /home/pi/mlb-led-scoreboar>
Aug 15 16:31:52 scoreboardpi sudo[661]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Aug 15 16:31:55 scoreboardpi main.py[662]: [2024-08-15 16:31:55] [RGBME] [ERROR]:
Aug 15 16:31:55 scoreboardpi main.py[662]: Failed to load SixelAdapter for "sixel" display adapter!
Aug 15 16:31:55 scoreboardpi main.py[662]: If this is not your configured display adapter, the emulator will continue to load.
Aug 15 16:31:55 scoreboardpi main.py[662]: You can suppress this error in the
emulator_config.json
by adding:Aug 15 16:31:55 scoreboardpi main.py[662]: "suppress_adapter_load_errors": true
Aug 15 16:31:55 scoreboardpi main.py[662]: Traceback (most recent call last):
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/driver/init.py", line 32, in set_mode
Aug 15 16:31:55 scoreboardpi main.py[662]: import rgbmatrix
Aug 15 16:31:55 scoreboardpi main.py[662]: ModuleNotFoundError: No module named 'rgbmatrix'
Aug 15 16:31:55 scoreboardpi main.py[662]: During handling of the above exception, another exception occurred:
Aug 15 16:31:55 scoreboardpi main.py[662]: Traceback (most recent call last):
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/venv/lib/python3.9/site-packages/RGBMatrixEmulator/adapters/init.py", line 51, in
Aug 15 16:31:55 scoreboardpi main.py[662]: package = importlib.import_module(package_path)
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
Aug 15 16:31:55 scoreboardpi main.py[662]: return _bootstrap._gcd_import(name[level:], package, level)
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 1030, in _gcd_import
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 1007, in _find_and_load
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 986, in _find_and_load_unlocked
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 680, in _load_unlocked
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 790, in exec_module
Aug 15 16:31:55 scoreboardpi main.py[662]: File "", line 228, in _call_with_frames_removed
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/venv/lib/python3.9/site-packages/RGBMatrixEmulator/adapters/sixel_adapter.py", line 5, in
Aug 15 16:31:55 scoreboardpi main.py[662]: import libsixel as sixel
Aug 15 16:31:55 scoreboardpi main.py[662]: File "/home/pi/mlb-led-scoreboard/venv/lib/python3.9/site-packages/libsixel/init.py", line 352, in
Aug 15 16:31:55 scoreboardpi main.py[662]: raise ImportError("libsixel not found.")
Aug 15 16:31:55 scoreboardpi main.py[662]: ImportError: libsixel not found.
Aug 15 16:31:58 scoreboardpi main.py[662]: [2024-08-15 16:31:58] [RGBME] [INFO]: RGBME v0.11.6 - 64x32 Matrix | 1x1 Chain | 16px per LED (SQUARE) | BrowserAdapter
Aug 15 16:31:58 scoreboardpi main.py[662]: [2024-08-15 16:31:58] [RGBME] [INFO]: Starting server...
Aug 15 16:31:58 scoreboardpi main.py[662]: [2024-08-15 16:31:58] [RGBME] [INFO]: Server started and ready to accept requests on http://localhost:8888/
I can browse to the scoreboard URL from my laptop and see that part is working fine.
My service file is as follows:
[Unit]
Description=MLB LED Scoreboard
Wants=network-online.target time-sync.target
After=network.target network-online.target time-sync.target
ExecStartPre=/bin/sleep/15
[Service]
Environment="SCOREBOARD_ARGS=--led-gpio-mapping=adafruit-hat-pwm --led-cols=64 --led-brightness=70 --led-slowdown-gpio=4 --config=/home/pi/mlb-led-scoreboard/config"
WorkingDirectory=/home/pi/mlb-led-scoreboard/
ExecStart=/home/pi/mlb-led-scoreboard/main.py $SCOREBOARD_ARGS
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
Running on Bullseye 64-bit. with a raspberry pi zero 2, with adafruit 64x32 panel and hat.
Beta Was this translation helpful? Give feedback.
All reactions