pymodbus import error: cannot import name 'ModbusSerialClient'

826 views Asked by At

I'm using raspberry pi 4, I want to communicate with my sensor through modbus ascii, and then I wrote a code using the "pymodbus", I'm sure I have installed it, and its version is 3.0.0r1, but when I import it, it shows:

Traceback (most recent call last): File "/home/yisi/Desktop/modbus.py", line 3, in from pymodbus import ModbusSerialClient as ModbusClient ImportError: cannot import name 'ModbusSerialClient' from 'pymodbus' (/usr/lib/python3/dist-packages/pymodbus/init.py)

anyone facing the same problem? I will appreciate it if you can give your advice. [enter image description here](https://i.stack.imgur.com/cLjt9.png)

I want to communicate with my sensor through modbus ascii

0

There are 0 answers