Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Message when trying to start the scoreboard #535

Open
1 of 2 tasks
PHI34Halladay opened this issue Apr 8, 2024 · 6 comments
Open
1 of 2 tasks

Error Message when trying to start the scoreboard #535

PHI34Halladay opened this issue Apr 8, 2024 · 6 comments

Comments

@PHI34Halladay
Copy link

This issue is a

  • Bug Report
  • Feature Request

Hardware Configuration

  • Raspberry Pi Revision (4B+/3B+/Zero/etc.): 4B
  • Operating System: raspberry
  • Matrix size: 128x64
  • Display adapter (HAT/Bonnet/etc.): adafruit-hat-pwm
    • Additional information:
  • Power source(s):

Software Configuration

  • MLB LED Scoreboard Version: 8.0.1
  • Commands/arguments used to start the scoreboard: sudo python3 /home/pi/mlb-led-scoreboard/main.py --led-rows=32 --led-cols=64 --led-chain=4 --led-gpio-mapping=adafruit-hat-pwm --led-pixel-mapper=U-mapper --led-brightness=30

Expected behavior

Scoreboard should start

Actual behavior

Scoreboard doesn't start

Additional Information

Guys, I'm running the MLB Scoreboard on my raspberry. I normally start the scoreboard by jumping in the mlb-led-scoreboard folder through cd mlb-led-scoreboard and then I run the command from above which works as it should.

I got myself a Homeassistant and I'm trying to create an automation that connects both the HA and my scoreboard.

All I need for this is just one command. So I tried using this command here:

sudo python3 /home/pi/mlb-led-scoreboard/main.py --led-rows=32 --led-cols=64 --led-chain=4 --led-gpio-mapping=adafruit-hat-pwm --led-pixel-mapper=U-mapper --led-brightness=30

I get this message in return:

pi@raspberrypi:~ $ sudo python3 /home/pi/mlb-led-scoreboard/main.py --led-rows=32 --led-cols=64 --led-chain=4 --led-gpio-mapping=adafruit-hat-pwm --led-pixel-mapper=U-mapper --led-brightness=30
ERROR (04:04:23): Untrapped error in main!
Traceback (most recent call last):
File "/home/pi/mlb-led-scoreboard/main.py", line 169, in
main(matrix, config)
File "/home/pi/mlb-led-scoreboard/main.py", line 41, in main
config = Config(config_base, matrix.width, matrix.height)
File "/home/pi/mlb-led-scoreboard/data/config/init.py", line 26, in init
self.preferred_teams = json["preferred"]["teams"]
KeyError: 'preferred'

How would the correct command be?

@Charliethom
Copy link

Don"t know if this will help or not, I am running s similar setup. First off I start mine from the mlb-led-scoreboard directory. My start command is "sudo python3 main.py --led-gpio-mapping=adafruit-hat-pwm --led-rows=64 --led-cols=64 --led-chain=2 --led-brightness=80 --led-slowdown-gpio=2 --led-no-hardware-pulse=2"
I am currently running 3 similar boards with same commands other than matrix size and rows and cols.
Hope this helps.

@ty-porter
Copy link
Collaborator

The command to start the scoreboard has changed in v8 compared to v7 and under.

https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard/blob/master/README.md#usage

sudo ./main.py <FLAGS>

@PHI34Halladay
Copy link
Author

Hi @ty-porter, that might be the missing part in my project :)

I will try it as soon as I get home.

Thanks in advance

@Charliethom
Copy link

Thanks for the tip, that worked.

@PHI34Halladay
Copy link
Author

Don't think that this command will work tho:

sudo python3 /home/pi/mlb-led-scoreboard/./main.py --led-rows=32 --led-cols=64 --led-chain=4 --led-gpio-mapping=adafruit-hat-pwm --led-pixel-mapper=U-mapper --led-brightness=30

I need one command that starts the scoreboard.

Right now I'm doing two commands by 1) going into the right folder (cd mlb-led-scoreboard) and 2) start it (sudo python3 ./main.py ...)
That needs to be put into just one command.

@ty-porter
Copy link
Collaborator

Don't think that this command will work tho:

sudo python3 /home/pi/mlb-led-scoreboard/./main.py --led-rows=32 --led-cols=64 --led-chain=4 --led-gpio-mapping=adafruit-hat-pwm --led-pixel-mapper=U-mapper --led-brightness=30

It will not, you need to use the command I showed above. You do not run this via python3 now. The script itself is executable and locates its own Python.

sudo ./home/pi/mlb-led-scoreboard/main.py <flags>

Right now I'm doing two commands by 1) going into the right folder (cd mlb-led-scoreboard) and 2) start it (sudo python3 ./main.py ...) That needs to be put into just one command.

Can say with confidence that it does not.

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

No branches or pull requests

3 participants