Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

`ModbusSerialClient` from `pymodbus.client.sync` vs. `pymodbus.client`

Writer Matthew Barrera

I've been using pymodbus to comminicate with a temperature sensor. Previously, I used:

from pymodbus.client.sync import ModbusSerialClient

and everything worked fine.

After a recent update, this was no longer possible (pymodbus.client.sync seems to have been removed, and I was getting an import error) and I had to switch to:

from pymodbus.client import ModbusSerialClient

The import now works, but none of my previous commands do. I've just spent the last 3 hours scouring the documentation and can't work out why this no longer works. I can communicate with my device using minimalmodbus, so I am confident that the device is working fine.

What have I missed? Any ideas?!

Related questions 3462 How do I select rows from a DataFrame based on column values? 2861 How can I remove a key from a Python dictionary? 2499 Importing files from different folder Related questions 3462 How do I select rows from a DataFrame based on column values? 2861 How can I remove a key from a Python dictionary? 2499 Importing files from different folder 2349 How can I randomly select (choose) an item from a list (get a random element)? 2147 Delete an element from a dictionary 2210 Delete a column from a Pandas DataFrame 2245 How to remove an element from a list by index 1767 How do I read from stdin? 1801 Extracting extension from filename in Python 2173 Why is reading lines from stdin much slower in C++ than Python? Load 7 more related questions Show fewer related questions Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.