adafruit / Adafruit_CircuitPython_GPS

GPS parsing module for CircuitPython. Meant to parse NMEA data from serial GPS modules.
MIT License
75 stars 58 forks source link

_parse_sentence may fail with an UnicodeError after a soft reboot #19

Closed MSube closed 5 years ago

MSube commented 5 years ago

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. code.py output: Traceback (most recent call last): File "code.py", line 7, in File "adafruit_gps.py", line 102, in update File "adafruit_gps.py", line 148, in _parse_sentence UnicodeError:

line 148: sentence = str(sentence, 'ascii').strip() fails if sentence contains stale data that is not ascii.

evaherrada commented 5 years ago

Can you check and see if this still happens? #21 should have fixed this