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

ImportError: attempted relative import with no known parent package #31

Open
cyrax72 opened this issue Nov 1, 2024 · 0 comments
Open

Comments

@cyrax72
Copy link

cyrax72 commented Nov 1, 2024

Hi. I run the application like this:
/home/pi/modbus2mqtt/bin/python3 -m modbus2mqtt --rtu /dev/ttyUSB0 --rtu-baud 9600 --rtu-parity none --mqtt-host localhost --config /home/pi/modbus2mqtt/example.csv

I get this error:

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/pi/modbus2mqtt/lib/python3.11/site-packages/modbus2mqtt/modbus2mqtt.py", line 44, in
from .addToHomeAssistant import HassConnector
ImportError: attempted relative import with no known parent package

the library versions are as follows:

/home/pi/modbus2mqtt/bin/pip3 list
Package Version


future 1.0.0
iso8601 2.1.0
modbus2mqtt 0.72
paho-mqtt 1.6.1
pip 23.0.1
pymodbus 3.7.4
PyYAML 6.0.2
serial 0.0.97
setuptools 66.1.1

Please tell me what is wrong and how to fix it? probably some libraries of the wrong version?

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

1 participant