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
I had this issue when using our app, which is relying on pyserial. It has two threads, one reading from a serial device and a second one is frequently calling serial.tools.list_ports.comports().
During operation, it failed with this:
Traceback (most recent call last):
File "/path/utility/SerialDevice.py", line 45, in discover_serial_devices
ports = serial.tools.list_ports.comports()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/venv/lib/python3.11/site-packages/serial/tools/list_ports_linux.py", line 102, in comports
for info in [SysFS(d) for d in devices]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/venv/lib/python3.11/site-packages/serial/tools/list_ports_linux.py", line 102, in <listcomp>
for info in [SysFS(d) for d in devices]
^^^^^^^^
File "/path/venv/lib/python3.11/site-packages/serial/tools/list_ports_linux.py", line 52, in __init__
self.vid = int(self.read_line(self.usb_device_path, 'idVendor'), 16)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() can't convert non-string with explicit base
While we can swallow the exception at the calling site, I don't think serial.tools.list_ports.comports() should throw in the first place.
The hardware is a STM32 board with custom software, and I'm quite sure it misbehaved but again comports() shouldn't throw IMO. I'll try to reproduce the issue, but don't hold your breath.
I had this issue when using our app, which is relying on
pyserial
. It has two threads, one reading from a serial device and a second one is frequently callingserial.tools.list_ports.comports()
.During operation, it failed with this:
While we can swallow the exception at the calling site, I don't think
serial.tools.list_ports.comports()
should throw in the first place.The hardware is a STM32 board with custom software, and I'm quite sure it misbehaved but again
comports()
shouldn't throw IMO. I'll try to reproduce the issue, but don't hold your breath.This issue has been cloned from: pyserial#774
The text was updated successfully, but these errors were encountered: