You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my new hardware with the latest Linux Rasbian OS (Bullseye), my Pymodbus script no longer runs. Somehow, I can not get the PyModbus 3.0 module installed correctly.
On my old system, my script runs with an older version of Pymodbus without any problems:
My Old system
pip3 show pymodbus
Name: pymodbus
Version: 2.5.3
Summary: A fully featured modbus protocol stack in python
Home-page: https://github.com/riptideio/pymodbus/
Author: Galen Collins
Author-email: bashwork@gmail.com
License: BSD-3-Clause
Location: /home/philo/.local/lib/python3.8/site-packages
Requires: six, pyserial
Required-by:
How do I get this to work, should I maybe downgrade my python version?
New System
~/python-skripte $ pip3 show pymodbus
Name: pymodbus
Version: 3.0.0
Summary: A fully featured modbus protocol stack in python
Home-page: https://github.com/riptideio/pymodbus/
Author: attr: pymodbus.author
Author-email: None
License: BSD-3-Clause
Location: /home/philo/.local/lib/python3.9/site-packages
Requires:
Required-by:
Error
~/python-skripte $ python3 websocketserver3.py
Traceback (most recent call last):
File "/home/philo/python-skripte/websocketserver3.py", line 9, in
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
ModuleNotFoundError: No module named 'pymodbus.client.sync'
~/python-skripte $ sudo python3 websocketserver3.py
Traceback (most recent call last):
File "/home/philo/python-skripte/websocketserver3.py", line 9, in
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
File "/usr/local/lib/python3.9/dist-packages/pymodbus/client/init.py", line 5, in
from pymodbus.client.serial import AsyncModbusSerialClient, ModbusSerialClient
File "/usr/local/lib/python3.9/dist-packages/pymodbus/client/serial.py", line 7, in
from serial_asyncio import create_serial_connection
ModuleNotFoundError: No module named 'serial_asyncio'
The text was updated successfully, but these errors were encountered:
Pymodbus.client.sync no longer exist it is now Pymodbus.client.
You also have not installed serial_asyncio.
There are (as noted) a number of important changes between 2.5.3 and 3.0.0 (as signalled by the change 2 -> 3) and you need you need to modify your script and environment accordingly.
Versions
Pymodbus Specific
Description
On my new hardware with the latest Linux Rasbian OS (Bullseye), my Pymodbus script no longer runs. Somehow, I can not get the PyModbus 3.0 module installed correctly.
On my old system, my script runs with an older version of Pymodbus without any problems:
My Old system
pip3 show pymodbus
Name: pymodbus
Version: 2.5.3
Summary: A fully featured modbus protocol stack in python
Home-page: https://github.com/riptideio/pymodbus/
Author: Galen Collins
Author-email: bashwork@gmail.com
License: BSD-3-Clause
Location: /home/philo/.local/lib/python3.8/site-packages
Requires: six, pyserial
Required-by:
How do I get this to work, should I maybe downgrade my python version?
New System
~/python-skripte $ pip3 show pymodbus
Name: pymodbus
Version: 3.0.0
Summary: A fully featured modbus protocol stack in python
Home-page: https://github.com/riptideio/pymodbus/
Author: attr: pymodbus.author
Author-email: None
License: BSD-3-Clause
Location: /home/philo/.local/lib/python3.9/site-packages
Requires:
Required-by:
Error
~/python-skripte $ python3 websocketserver3.py
Traceback (most recent call last):
File "/home/philo/python-skripte/websocketserver3.py", line 9, in
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
ModuleNotFoundError: No module named 'pymodbus.client.sync'
~/python-skripte $ sudo python3 websocketserver3.py
Traceback (most recent call last):
File "/home/philo/python-skripte/websocketserver3.py", line 9, in
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
File "/usr/local/lib/python3.9/dist-packages/pymodbus/client/init.py", line 5, in
from pymodbus.client.serial import AsyncModbusSerialClient, ModbusSerialClient
File "/usr/local/lib/python3.9/dist-packages/pymodbus/client/serial.py", line 7, in
from serial_asyncio import create_serial_connection
ModuleNotFoundError: No module named 'serial_asyncio'
The text was updated successfully, but these errors were encountered: