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 using the RemoteSlaveContext and trying to read any modbus register, a TypeError occures:
File ".venv\Lib\site-packages\pymodbus\datastore\remote.py", line 82, in <lambda>
"h": lambda a, c: self._client.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ModbusClientMixin.read_holding_registers() takes 2 positional arguments but 3 were given
pymodbus version: 3.8.3
Example to reproduce error
This is a minimal code example to reproduce this error:
When using the
RemoteSlaveContext
and trying to read any modbus register, aTypeError
occures:pymodbus version:
3.8.3
Example to reproduce error
This is a minimal code example to reproduce this error:
Possible fix
This error can be fixed by simply adding
count=
in the lambda function ofRemoteSlaveContext.__build_mapping()
:(
pymodbus/datastore/remote.py
,line 75
)The text was updated successfully, but these errors were encountered: