Python Forum
Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help with pySerial
#8
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...
Reply


Messages In This Thread
I need help with pySerial - by oz1sej - Apr-12-2017, 05:56 AM
RE: I need help with pySerial - by j.crater - Apr-12-2017, 06:12 AM
RE: I need help with pySerial - by buran - Apr-12-2017, 06:13 AM
RE: I need help with pySerial - by oz1sej - Apr-12-2017, 07:14 AM
RE: I need help with pySerial - by j.crater - Apr-12-2017, 07:21 AM
RE: I need help with pySerial - by oz1sej - Apr-12-2017, 07:41 AM
RE: I need help with pySerial - by j.crater - Apr-12-2017, 07:45 AM
RE: I need help with pySerial - by oz1sej - Apr-12-2017, 09:53 AM
RE: I need help with pySerial - by j.crater - Apr-13-2017, 05:20 AM
RE: I need help with pySerial - by Larz60+ - Apr-13-2017, 06:12 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020