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
When the code execute the second call this exception appears:
INFO:root:Started /dev/ttyUSB0 #SECONDNUMBER 1 1 1
INFO:iec870ree.modem:try open port 0
INFO:iec870ree.modem:serial port /dev/ttyUSB0 opened
INFO:iec870ree.modem:read thread Starting
INFO:iec870ree.modem:sending command ATZ
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/dist-packages/iec870ree-0.6.0-py3.8.egg/iec870ree/modem.py", line 144, in read_port
File "/usr/local/lib/python3.8/dist-packages/pyserial-3.4-py3.8.egg/serial/serialposix.py", line 494, in read
buf = os.read(self.fd, size - len(read))
TypeError: an integer is required (got type NoneType)
INFO:iec870ree.modem:R-ATZ
The error comes from the 494 line of serialposix.py, here: buf = os.read(self.fd, size - len(read))
Problem is that self.fd is None after the first number, any idea of how fix this?
The text was updated successfully, but these errors were encountered:
It seems like is a problem in the connection with the modem, can you try upgrading pyserial package? or you can use the modem directly with the terminal?
When the code execute the second call this exception appears:
INFO:root:Started /dev/ttyUSB0 #SECONDNUMBER 1 1 1
INFO:iec870ree.modem:try open port 0
INFO:iec870ree.modem:serial port /dev/ttyUSB0 opened
INFO:iec870ree.modem:read thread Starting
INFO:iec870ree.modem:sending command ATZ
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/dist-packages/iec870ree-0.6.0-py3.8.egg/iec870ree/modem.py", line 144, in read_port
File "/usr/local/lib/python3.8/dist-packages/pyserial-3.4-py3.8.egg/serial/serialposix.py", line 494, in read
buf = os.read(self.fd, size - len(read))
TypeError: an integer is required (got type NoneType)
INFO:iec870ree.modem:R-ATZ
INFO:iec870ree.modem:R-OK
INFO:iec870ree.modem:sending command AT+CBST=7,0,1
INFO:iec870ree.modem:R-AT+CBST=7,0,1
INFO:iec870ree.modem:R-OK
The error comes from the 494 line of serialposix.py, here: buf = os.read(self.fd, size - len(read))
Problem is that self.fd is None after the first number, any idea of how fix this?
The text was updated successfully, but these errors were encountered: