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

problem with imports when trying sample code #2

Open
andysc opened this issue Aug 31, 2023 · 0 comments
Open

problem with imports when trying sample code #2

andysc opened this issue Aug 31, 2023 · 0 comments

Comments

@andysc
Copy link

andysc commented Aug 31, 2023

  • GivEnergy Modbus version: 0.10.1
  • Python version: 3.9.2
  • Operating System: raspbian bullseye

Description

I'm trying to run the sample code given in https://github.com/GivEnergy/givenergy-modbus2#readme.
It fails trying to import GivEnergyClient from givenergy_modbus.client

(I am a bit of a python n00b, so I might be missing something obvious)

What I Did

I copied and pasted the sample code into a file (test.py) in ~/givenergy-modbus2/.
I commented out the lines which send control signals to the inverter.
I ran the code with
python test.py

Traceback (most recent call last):
  File "/home/pi/givenergy-modbus2/test2.py", line 2, in <module>
    from givenergy_modbus.client import GivEnergyClient
ImportError: cannot import name 'GivEnergyClient' from 'givenergy_modbus.client' (/home/pi/givenergy-modbus2/givenergy_modbus/client/__init__.py)

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