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

Big board plugin should be more resilient to bad data #9

Open
dowski opened this issue Apr 10, 2021 · 1 comment
Open

Big board plugin should be more resilient to bad data #9

dowski opened this issue Apr 10, 2021 · 1 comment

Comments

@dowski
Copy link
Owner

dowski commented Apr 10, 2021

Here's an example from the logs where it crashed when the API returned 5 strikes.

Apr 10 18:16:25 scoreboard2 scoreboard[338]: Cleveland Indians: 0, Detroit Tigers: 0, Top of 1 (b:0, s:5, o:2, runners:())
Apr 10 18:16:25 scoreboard2 scoreboard[338]: Traceback (most recent call last):
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/home/pi/deploy/env/bin/scoreboard", line 11, in <module>
Apr 10 18:16:25 scoreboard2 scoreboard[338]:     load_entry_point('dowski.scoreboard', 'console_scripts', 'scoreboard')()
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/home/pi/deploy/scoreboard/scoreboard/scoreboard.py", line 47, in start
Apr 10 18:16:25 scoreboard2 scoreboard[338]:     main(sys.argv)
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/home/pi/deploy/scoreboard/scoreboard/scoreboard.py", line 67, in main
Apr 10 18:16:25 scoreboard2 scoreboard[338]:     jobs.run()
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/usr/lib/python3.7/sched.py", line 151, in run
Apr 10 18:16:25 scoreboard2 scoreboard[338]:     action(*argument, **kwargs)
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/home/pi/deploy/scoreboard/scoreboard/tracker.py", line 100, in track
Apr 10 18:16:25 scoreboard2 scoreboard[338]:     outs=render_state.outs)
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/home/pi/deploy/env/lib/python3.7/site-packages/scoreboard.plugins.bigboard-0.9.0-py3.7.egg/bigboard/display.py", line 68, in set_inning_state
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/home/pi/deploy/env/lib/python3.7/site-packages/scoreboard.plugins.bigboard-0.9.0-py3.7.egg/bigboard/display.py", line 90, in _refresh
Apr 10 18:16:25 scoreboard2 scoreboard[338]:   File "/home/pi/deploy/env/lib/python3.7/site-packages/scoreboard.plugins.bigboard-0.9.0-py3.7.egg/bigboard/display.py", line 125, in show_strikes
Apr 10 18:16:25 scoreboard2 scoreboard[338]: KeyError: 5
@dowski
Copy link
Owner Author

dowski commented Mar 29, 2024

I haven't seen this be much of a problem in the last couple years. It should probably be more resilient, I just haven't had motivation to do it since it's "just worked".

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

1 participant