Alexa Media Player not functioning after HA update, can't remove or update AMP?

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 it :weary:

After I updated HA I noticed none of my echo dot media players were showing up as entities so I checked the integration - AMP said ā€œnot loadedā€ under it. I didnā€™t have the option to reload it, reconfigure or anything except disable or delete. So I deleted it from my integrations and then remembered itā€™s a custom integration and probably has to be configured in HACS. So I look under HACS and its still there showing that thereā€™s an update.
image

I tried to update it, restarted HA, nothing. Still there under HACS saying:

Installed version: v3.8.2

Available version: v3.8.5

So I try uninstalling it from there, restart HA, go back to HACS, still there showing as needing an update.

Iā€™ve tried this a several times now and nothing is working, no matter what I do it still says I have version 3.8.2 and need to update it. I looked through my config to see if there were any traces of AMP that are causing it to look like its still installed but canā€™t find anything relating to it. Does anyone have any ideas?

I saved a snapshot before I updated HA but Iā€™d rather not have to revert back to the old version.

Edit: I DID find the alexa media directory under custom components in my files but Iā€™m unable to delete it.

Edit #2: I reloaded the last snapshot of HA and Iā€™m still having the same problem. I just want AMP gone at this point.

Same issue here. Unable to activate the plugin, and unable to remove it.


Setup failed for alexa_media: unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 181, 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 20, 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

as nearly as i can tell this is related to the alexapy library thatā€™s imported into ha. working on a solution.

so i connected to my docker image and update pip and the async_timeout libraries. I got home assistant errors though after completing those updates and restarting the server (but not the docker container) the alexa_media player installed and worked. The issue is that alexa_media player needs async_timeout > version 4 and ha doesnā€™t support that yet.

I managed to get around it by reloading a previous snapshot. I updated AMP first and then updated the whole system again. Seems to be working okay now.

How is a non-linux guy supposed to resolve this? Same issue, since this is an old discussion is there any chance this has been updated? Or how do I find out what version I have? How do I update it?

Open HACS in a web browser.
Here you can see if there are any updates.
To check the version of Alexa Media Player, click on it. The version is visible in the top left corner.

Thanks I ended up rebuilding my HA from scratch. AMP is working.

1 Like