home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.28k stars 30.61k forks source link

Unable to add Amber Electric Integration #96203

Closed angryninja48 closed 1 year ago

angryninja48 commented 1 year ago

The problem

Fails when adding the integration through the UI " Config flow could not be loaded: Method Not Allowed "

Logs also have the following error 2023-07-09 21:45:35.112 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration amberelectric: cannot import name 'Descriptor' from 'amberelectric.model.interval' (/config/deps/lib/python3.11/site-packages/amberelectric/model/interval.py)

What version of Home Assistant Core has the issue?

core-2023.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Amber Electric

Link to integration documentation on our website

https://www.home-assistant.io/integrations/amberelectric

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-07-09 21:45:35.112 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration amberelectric: cannot import name 'Descriptor' from 'amberelectric.model.interval' (/config/deps/lib/python3.11/site-packages/amberelectric/model/interval.py)
2023-07-09 21:48:40.434 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration amberelectric: cannot import name 'Descriptor' from 'amberelectric.model.interval' (/config/deps/lib/python3.11/site-packages/amberelectric/model/interval.py)

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @madpilot, mind taking a look at this issue as it has been labeled with an integration (amberelectric) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `amberelectric` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign amberelectric` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


amberelectric documentation amberelectric source (message by IssueLinks)

madpilot commented 1 year ago

That field was added about a year ago to the supporting python package. Can you check the VERSION constant in /config/deps/lib/python3.11/site-packages/amberelectric/setup.py - it should be 1.0.4. If it isn't, you will need to upgrade the package.

angryninja48 commented 1 year ago

Doesn't seem to exist? root@k3s-2:/config# ls /config/deps/lib/python3.11/site-packages/amberelectric/ api configuration.py exceptions.py __init__.py model model_utils.py __pycache__ rest.py

This is using the ghcr.io/home-assistant/home-assistant:2023.7.1 container

madpilot commented 1 year ago

Can you run ls /config/deps/lib/python3.11/site-packages/amberelectric/model/ and see if there is an interval.py file there?

I'm running the latest docker container at home it's working. It sounds like the pip module didn't install correctly.

angryninja48 commented 1 year ago

Something was messed up with my python packages - ended up blowing away /config/deps/lib/python3.11/site-packages/amberelectric and redeployed the container. Problem solved!

Thanks for the help