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

Integration not getting loaded after upgrading to 2024.10.x #2595

Closed
kaizersoje opened this issue Oct 6, 2024 · 3 comments
Closed

Integration not getting loaded after upgrading to 2024.10.x #2595

kaizersoje opened this issue Oct 6, 2024 · 3 comments

Comments

@kaizersoje
Copy link

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

The integration is not getting loaded after upgrading to 2024.10.x

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

System details

  • Home Assistant version:
  • alexa_media version (from const.py or HA startup log): 4.13.4
  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log):
  • Is Amazon 2FA/2SV enabled <!---We will not debug login issues if unanswered---> (y/n): y
  • Amazon Domain: amazon.com.au

Debug Logs (alexa_media & alexapy)
Please provide logs.

2024-10-07 07:00:24.848 ERROR (SyncWorker_1) [homeassistant.util.package] Installed version for alexapy resolved to None
2024-10-07 07:00:33.714 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.alexa_media',) inside the event loop by integration 'config' at homeassistant/components/config/config_entries.py, line 421: success = await hass.config_entries.async_set_disabled_by( (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1067: ComponentProtocol, importlib.import_module(self.pkg_path)), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+config%22
2024-10-07 07:00:33.720 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'alexa_media': Unable to import component: cannot import name 'AlexaAPI' from 'alexapy' (/usr/local/lib/python3.12/site-packages/alexapy/__init__.py)
File "/config/custom_components/alexa_media/__init__.py", line 18, in <module>
from alexapy import (
ImportError: cannot import name 'AlexaAPI' from 'alexapy' (/usr/local/lib/python3.12/site-packages/alexapy/__init__.py)
File "/config/custom_components/alexa_media/__init__.py", line 18, in <module>
from alexapy import (
ImportError: cannot import name 'AlexaAPI' from 'alexapy' (/usr/local/lib/python3.12/site-packages/alexapy/__init__.py)

Additional context

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Oct 7, 2024

System details

Home Assistant version:
alexa_media version (from const.py or HA startup log): 4.13.4
alexapy version (from pip show alexapy in homeasssistant container or HA startup log): ????????
Is Amazon 2FA/2SV enabled <!---We will not debug login issues if unanswered---> (y/n): y
Amazon Domain: amazon.com.au

alexapy is not installed: [homeassistant.util.package] Installed version for alexapy resolved to None

Home Assistant logs should show:
2024-10-07 13:57:07.421 DEBUG (MainThread) [custom_components.alexa_media] Loaded alexapy==1.29.2

configuration.yaml:

logger:
  logs:
    alexapy: debug
    custom_components.alexa_media: debug

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Oct 10, 2024

@kaizersoje, @SylTi
After a virgin installation of the AMP custom component in HACS, it takes two restarts before alexapy is running.
The first restart just installs the alexapy dependency in /usr/local/lib/python3.12/site-packages/alexapy/ and the 2nd restart then activates the custom component package within the running HA core.

@danielbrunt57
Copy link
Collaborator

This issue might have occurred as a result of the short term block that HA imposed on AMP as v4.13.3 was causing HA to crash. That block has now been removed...

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

2 participants