Re: UnicodeDecodeError from tty.readline(), u-Blox 8

2023-05-29 Thread Gary E. Miller via devel
Yo Hal! On Mon, 29 May 2023 15:22:43 -0700 Hal Murray via devel wrote: > Can somebody give me a lesson on this area? > > The code is: > tty = open("/dev/ttyACM0") > forever: > line = tty.readline() > a) How do I read mostly ASCII without crashing when there is > non-ASCII? To open to

UnicodeDecodeError from tty.readline(), u-Blox 8

2023-05-29 Thread Hal Murray via devel
Can somebody give me a lesson on this area? The code is: tty = open("/dev/ttyACM0") forever: line = tty.readline() a) How do I read mostly ASCII without crashing when there is non-ASCII? b) Why is a u-Blox LEA-M8T sending me non-ASCII crap? This is coming from the USB port. It's ru