Hello. Some time to time, I experiment serial port disconnection, due to some kind of USB hub failure. The message I get when this happens is:
"SerialException(
'device reports readiness to read but returned no data (device isconnected or multiple access on port?)')"
from serial.serialposix.Serial.read().
The stack trace (regarding mpf) is
machine.py: 770
machine.py: 820
opp/opp.py: 197
base_serial_communicator.py:149
The problem is that I have 7 serial ports (2 hubs), and as the message does not state the port, it is not easy to find the culprit.
May be this exception should be caught and a better message reported with the port name.
Some help to improve the code is appreciated !