Apr-12-2017, 09:53 AM
Yeah, I know, it really is COM32 - https://drive.google.com/file/d/0B5XNv8m...GRFdjFBS00 - I'm using an APC220 wireless interface.
I just realised: The error isn't in my file (logserial.py) - I had a file called serial.py in my dir, so obviously that's why it failed. I renamed the file, and I had data:
b'122;234\r\n
b'123;234\r\n
b'124;234\r\n
b'125;234\r\n
b'126;234\r\n
...
I removed the b' and \r\n with .decode('utf-8') and everything was fine, except for a superfluous line break. But after a while, I started getting empty lines. I removed the .decode('utf-8'), and now, all I get is
b''
b''
b''
b''
...
The connection is fine, because when I use another terminal program, I have nice data. Now it's only the python program, that doesn't "see" the data...
I just realised: The error isn't in my file (logserial.py) - I had a file called serial.py in my dir, so obviously that's why it failed. I renamed the file, and I had data:
b'122;234\r\n
b'123;234\r\n
b'124;234\r\n
b'125;234\r\n
b'126;234\r\n
...
I removed the b' and \r\n with .decode('utf-8') and everything was fine, except for a superfluous line break. But after a while, I started getting empty lines. I removed the .decode('utf-8'), and now, all I get is
b''
b''
b''
b''
...
The connection is fine, because when I use another terminal program, I have nice data. Now it's only the python program, that doesn't "see" the data...