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
Previously, a timeout during a call to e.g. client.read_coils would log an error and return an exception response. As of 3.8.0, this instead returns None in the async client, which breaks the normal usage of PyModbus as given in the documentation:
try:
rr=awaitclient.read_coils(1, 1, slave=1)
exceptModbusExceptionasexc:
_logger.error(f"ERROR: exception in pymodbus {exc}")
raiseexcifrr.isError(): # Error: NoneType has attribute 'isError'._logger.error("ERROR: pymodbus returned an error!")
raiseModbusException(txt)
This can be seen by comparing TransactionManager's sync_execute:
txt=f"No response received after {self.retries} retries, continue with next request"Log.error(txt)
raiseModbusIOException(txt)
Versions
Description
Previously, a timeout during a call to e.g.
client.read_coils
would log an error and return an exception response. As of 3.8.0, this instead returnsNone
in the async client, which breaks the normal usage of PyModbus as given in the documentation:This can be seen by comparing
TransactionManager
'ssync_execute
:with
execute
:The text was updated successfully, but these errors were encountered: