Set unit
argument and use the print(request.registers)
instead of print(request)
.
Here's an example:
request = client.read_holding_registers(4138, 1, unit=1) # Set unit argument.
if not request.isError():
'''isError() method implemented in pymodbus 1.4.0 and above'''
print(request.registers) # Your problem is here.
else:
# Do stuff for error handling.
print('Error message: {}'.format(request))