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
Python having problems finding things in givenergy-modbus library when trying to run cli.py
(Some of this might be being a bit of a python n00b)
What I did
Trying to run cli.py from where git clone put it: ~/givenergy-modbus2/givenergy_modbus.
First it complained: ModuleNotFoundError: No module named 'givenergy_modbus.client.coordinator'; 'givenergy_modbus.client' is not a package
presumably because of the way the directories have been organised.
Copied cli.py up a level (into ~/giveenergy-modbus2) and then python cli.py gives the help text.
But python cli.py -h xx.xx.xx.xx dump-registers
gives
File "/home/pi/givenergy-modbus2/cli.py", line 184, in <module>
main(obj={}) # pragma: no cover
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/pi/givenergy-modbus2/cli.py", line 71, in dump_registers
ctx.obj['CLIENT'].refresh_plant(plant=plant, full_refresh=True)
AttributeError: 'Coordinator' object has no attribute 'refresh_plant'
The text was updated successfully, but these errors were encountered:
Description
Python having problems finding things in
givenergy-modbus
library when trying to runcli.py
(Some of this might be being a bit of a python n00b)
What I did
Trying to run
cli.py
from wheregit clone
put it:~/givenergy-modbus2/givenergy_modbus
.First it complained:
ModuleNotFoundError: No module named 'givenergy_modbus.client.coordinator'; 'givenergy_modbus.client' is not a package
presumably because of the way the directories have been organised.
Copied
cli.py
up a level (into~/giveenergy-modbus2
) and thenpython cli.py
gives the help text.But
python cli.py -h xx.xx.xx.xx dump-registers
gives
The text was updated successfully, but these errors were encountered: