Alexa media fails to load in Home assistant dev (2021.12)
See original GitHub issueDescribe the bug In the daily/dev build, alexa media player fails to load. It seems something in the backend changed. I updated to the current daily (11/6) and this error is in the logs:
2021-11-07 05:04:27 ERROR (MainThread) [homeassistant.setup] Setup failed for alexa_media: unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 206, in _async_setup_component
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 522, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/alexa_media/__init__.py", line 16, in <module>
from alexapy import (
File "/usr/local/lib/python3.9/site-packages/alexapy/__init__.py", line 16, in <module>
from .alexaapi import AlexaAPI
File "/usr/local/lib/python3.9/site-packages/alexapy/alexaapi.py", line 21, in <module>
from alexapy.aiohttp import ClientConnectionError, ClientResponse
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/client.py", line 35, in <module>
from . import hdrs, http, payload
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/http.py", line 7, in <module>
from .http_parser import (
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/http_parser.py", line 15, in <module>
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/helpers.py", line 667, in <module>
class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str
To Reproduce Update to the latest dev version and load alexa_meda
Expected behavior For it to work.
Screenshots N/A
System details
- Home-assistant (version): supervisor-2021.11.dev0401
- Hassio (Yes/No): Supervised.
- alexa_media (version from
const.py
or HA startup): v3.10.10 - alexapy (version from
pip show alexapy
or HA startup): 1.25.1 - Amazon 2FA is enabled (y/n). We will not debug login issues if unanswered: y
Logs Please provide logs. We’ll be most likely asking for them anyway.
2021-11-07 05:04:27 ERROR (MainThread) [homeassistant.setup] Setup failed for alexa_media: unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 206, in _async_setup_component
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 522, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/alexa_media/__init__.py", line 16, in <module>
from alexapy import (
File "/usr/local/lib/python3.9/site-packages/alexapy/__init__.py", line 16, in <module>
from .alexaapi import AlexaAPI
File "/usr/local/lib/python3.9/site-packages/alexapy/alexaapi.py", line 21, in <module>
from alexapy.aiohttp import ClientConnectionError, ClientResponse
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/client.py", line 35, in <module>
from . import hdrs, http, payload
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/http.py", line 7, in <module>
from .http_parser import (
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/http_parser.py", line 15, in <module>
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/local/lib/python3.9/site-packages/alexapy/aiohttp/helpers.py", line 667, in <module>
class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:20
Top Results From Across the Web
Alexa Media Player broke after December OS and Core updates
Something happened to my Alexa Media Player integration after I ran updates and have no clue how to resolve it. I am now...
Read more >HA 2021.12.0b1-3 and Alexa Media Player - Configuration
0b1 and including 2021.12.0b3, my Alexa Media Player won't load. Reverting back to 2021.11 fixes everything though.
Read more >Config check failing on 2 systems going from 2021.11.5 to ...
You have to update alexa media player and home assistant. Config check will fail if alexa media player is not up to date....
Read more >Alexa Media Player not functioning after HA update, can't ...
I just updated to 2021.12.7 and Alexa Media Player stopped working right. I may have messed it up even more trying to uninstall...
Read more >2022.12: It does matter! - Home Assistant
It is a big and important foundation that is probably best described as “alpha” or maybe even a “developer preview” — allowing anyone...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Dev will also get the latest version. It’s currently identical to 3.10.15. Obviously dev may get updated in the future so I’d advise you to grab a numbered release.
@zibous I just skipped the whole HACS thing and did the manual steps here and WOW! https://github.com/custom-components/alexa_media_player/wiki/Configuration#manual-mode
Thanks for keeping me persistent!
It even fixed all my NodeRED stuff automatically when adding all the devices back without having to rename entity IDs or anything. Wow. I can now go have lunch and sleep now. 😃