question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError with home-assistant v. >= 0.88.0

See original GitHub issue
Error loading custom_components.media_player.alexa. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 147, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/media_player/alexa.py", line 16, in <module>
    from homeassistant.components.media_player import (
ImportError: cannot import name 'MEDIA_TYPE_MUSIC' from 'homeassistant.components.media_player' (/usr/local/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py)

Report

Caused by change in package bundling:

Note for custom component developers: We are moving to a new file structure. Platforms now live embedded in components. Custom platforms will have to be updated to follow this pattern. This is a breaking change in case your custom platform overrides a built-in platform. Rename your custom platform from, ie light/hue.py to hue/light.py.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
alandtsecommented, Feb 15, 2019

This was also addressed by #75, but I didn’t realize it was submitted and will use #77 to close since it has the version increment. Thanks to @akinomeroglu for his effort.

0reactions
chali272commented, Feb 21, 2019

@chali272 It will work for now, but will break in some point in the future.

ok thank you. Does this support multiple account yet? (like to ad my kids accounts) //Regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Echo Devices (Alexa) as Media Player - Testers Needed
Im on 0.88.0 and have the latest version of the Alexa media player and get the below error when trying to use the...
Read more >
Having problems installing : r/homeassistant - Reddit
ImportError: cannot import name 'contextfilter' from 'jinja2' ... There is an option to install home assistant to your sd card.
Read more >
HomeAssistantRepository/CHANGELOG.txt at ... - Gitea - Edevau.net
Gentoo Overlay: Home Assistant on Gentoo Linux without virtualenv or docker. ... update holidays-0.10.5.2-r1, fix import error ... release 0.88.0.
Read more >
pil image to base64 - Small Switch
base64 to PIL or OpenCV image base64 to PIL Image. Steps. Import the required libraries. The required libraries are torch, torchvision, Pillow. Read...
Read more >
Untitled
Pil image to base64. Optimize your images and convert them to base64 online. Drag & Drop your files, copy to clipboard with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found