Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to start in Standalone: No module named pymodbus.client.sync #35

Open
alexbahder opened this issue May 30, 2023 · 3 comments
Open

Comments

@alexbahder
Copy link

I'm getting a failure trying to run this for testing... when I run it, I'm getting ModuleNotFoundError: No module named 'pymodbus.client.sync'.

I have already tried re-running 'pip install pymodbus', and it claims the requirement is already satisfied.

Any idea as to what I'm doing wrong?

@mcsarge
Copy link
Member

mcsarge commented May 30, 2023

I saw this when I searched for pymodbus.client.sync:

Looks like the new version of pymodbus is to blame.

The older version of Pymodbus used the syntax:
from Pymodbus.client.sync import ModbusTcpClient
whereas now on the current version the Docs suggest that the sync has been dropped and the correct syntax is:
from Pymodbus.client import ModbusTcpClient

Also, change the "unit=" to "slave=" in classic_modbusdecoder.py

Please try that and let me know.

@eode
Copy link
Contributor

eode commented Nov 9, 2023

Hey-oh, just ran into this today. I've made the changes locally, so I may as well pass 'em on. I'll make a PR shortly.

@eode
Copy link
Contributor

eode commented Nov 9, 2023

Still compatible with pymodbus 2.x.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants