kenschneider18/rpi-metro-display

Exception Error and Station Code Questions

Opened this issue · 4 comments

jhkubs commented

Hello!

I've been attempting to get my metro display working with a stock Pi 4running DietPi as suggested. I have everything installed per the instructions, but when I go to run the program (either using ./run.sh directly or through the service), nothing happens and I get a set of uncaught exception errors in the log.txt file. With my limited programming knowledge I mostly understand the error, but the traceback code (hexadecimal?) is gibberish/useless. Here's an example:

Uncaught exception!
Type: <class 'TypeError'>
Value: one character bytes, bytearray or integer expected
TB: <traceback object at 0x7f87164340>

Also - is there a good reference available for the station and direction codes? I am not sure if I should be using the full name of a station or its 3 letter identifier e.g. N07 in the run.sh file.

Thank you!

Can you try pulling the latest code again? I think the default Python installed by Dietpi is now Python 3. I just merged an update that supports Python 3. You might have to re-run step 7 from the README again to get the dependencies.

sudo pip install --break-system-packages -r requirements.txt

Let me know if you have any luck/the error message changes

For your second question, you can use the response from the stations API or the stations.json file you create to see the mapping between station name and code. For your run.sh you should use the 3 letter identifier.

jhkubs commented
jhkubs commented

Viola! Everything is working now after re-pulling the code, updating dependencies and using the 3 letter ID for station and single digit direction code (I'm using 2 for BL/OR/SV headed westbound).

Thank you for the help! Fun, functional, and educational project!