pymodbus-dev / pymodbus

A full modbus protocol written in python
Other
2.22k stars 907 forks source link

No example works, none #1906

Closed dvalladares66 closed 8 months ago

dvalladares66 commented 9 months ago

I try pymodbus but all exampls fails. I am using python 3.11 and pymodbus 3.5.4 in Debian 11 running in WSL from Windows 10.

For example, in simple_async_client.py i get ImportError: cannot import name 'ExceptionResponse'. I fix with but Framer an ModbusException get the same error. Fixing this, now i get other erros, and so on

Using the example client_async.py, i get ImportError: cannot import name 'ModbusException' from 'pymodbus'. Fix his an then i get more error File ".../client_async.py", line 141, in asyncio.run(main(), debug=True) # pragma: no cover ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/mnt/c/Projects/python/pymodbus/examples/client_async.py", line 136, in main testclient = setup_async_client(description="Run client.", cmdline=cmdline) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/c/Projects/python/pymodbus/examples/client_async.py", line 50, in setup_async_client

I tried several examples and they all failed me.

janiversen commented 9 months ago

Seems you have not installed pymodbus correctly, please reinstall pymodbus.

The examples do work, they are tested with every commit on github.

janiversen commented 9 months ago

Try the simple examples first, they can be downloaded directly from the documentation as single files that do not depend on other matters.

janiversen commented 9 months ago

Apart from that 3.6.0 will be available this week

janiversen commented 8 months ago

Closing due to lack of activity.