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 running cli.py #1

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

problem running cli.py #1

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

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'
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