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
auto-flusTraceback (most recent call last):
File "C:\Users\gabriel\GS\dev\eRCaGuy_PyTerm\serial_terminal.py", line 264, in <module>
main()
File "C:\Users\gabriel\GS\dev\eRCaGuy_PyTerm\serial_terminal.py", line 151, in main
data_str = data_bytes.decode('ascii')
^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf9 in position 3: ordinal not in range(128)
Do a try/catch around this line, and gracefully handle errors when the chars are binary instead of ASCII:
eRCaGuy_PyTerm/serial_terminal.py
Line 151 in 1274e81
Sometimes garbled data comes over serial, crashing the program otherwise when an invalid (ie: binary instead of ASCII) byte arrives.
The text was updated successfully, but these errors were encountered: