Core: Unable to import component xiaomi_aqara after upgrade to 0.103.0

Created on 12 Dec 2019  路  18Comments  路  Source: home-assistant/core

Home Assistant release with the issue:
0.103.0

Last working Home Assistant release (if known):
0.102.3

Operating environment (Hass.io/Docker/Windows/etc.):
Raspbian GNU/Linux 10 (buster)
python_version 3.7.5

Integration:
https://www.home-assistant.io/integrations/xiaomi_aqara/

Description of problem:
After upgrade from 0.102.3 to 0.103.0, my home assistant service doesn't start.

Debug:
ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Unable to import component

Workaround: rollback to 0.102.3

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

xiaomi_aqara:
  gateways:
    - host: ip.ip.ip.ip
      mac: 11aa22bb33cc
      key: xxxxxxxxxxxxxxxx

Traceback (if applicable):


Additional information:

xiaomi_aqara

Most helpful comment

On hassio all integrations using netdisco are broken:

Failed config
General Errors:
- Component error: yeelight - No module named 'netdisco'
- Component error: octoprint - No module named 'netdisco'

All 18 comments

My issue has been fixed (module netdisco was not installed):

I went into my home assistent python environment

then:
cd /srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/xiaomi_aqara

executing "python __init__.py" bumped into this issue

...
# trying /srv/homeassistant/lib/python3.7/site-packages/netdisco.pyc
Traceback (most recent call last):
File "__init__.py", line 8, in
from homeassistant.components.discovery import SERVICE_XIAOMI_GW
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/discovery/__init__.py", line 13, in
from netdisco.discovery import NetworkDiscovery
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'netdisco'
...

After installing netdisco (pip3 install netdisco) and rebooting my raspberry, home assistant is running again.

Shouldn't netdisco come while upgrading home assistant to 0.103.0?

Hey there @danielhiversen, @syssi, mind taking a look at this issue as its been labeled with a integration (xiaomi_aqara) you are listed as a codeowner for? Thanks!

same here. Using hass.io so I cannot install netdisco (I suppose)

On hassio all integrations using netdisco are broken:

Failed config
General Errors:
- Component error: yeelight - No module named 'netdisco'
- Component error: octoprint - No module named 'netdisco'

Same here, using hassio

Have this problem too, can't upgrade until it's fixed.

Issue is gone on 0.103.2 for me

Same issue with 0.103.5 on Arch. Wemo and Roku would not import after the update. I had to install pywemo, pyroku, then netdisco.

Issue is gone on 0.103.2 for me
0.103.2 does not work for me. Sticking to 0.102.3 for now.

Same issue on 0.103.6 on hassio.

I had no issues on 0.103.2-0.103.5, could upgrade and everything worked. Now issue is back again on 0.103.6. Have hassio-installer installed Hass.io

Same issue on 0.103.6 on hassio.

I am holding off on upgrading from 102.2 because of this issue. It looks like it is still not sorted?

Reading the release notes from 103 > 103.6 there is no mention of this netdisco issue, but I would hope it gets resolve soon so those that run Yeelight or Xiaomi sensors can upgrade.

I am running hassio and I have run the "Check Home Assistant configuration" ad-on which flagged this issue - and a quick google led me to this thread.

The error is back with 0.104.2.
Component error: yeelight - No module named 'netdisco'

I also sometimes experience "No module named 'netdisco'" error when I run Configuration Check add-on.
But when I run check for second or third time, error disappears and update process is successful ...
I'm now on 0.104.2 and Xiaomi integration works without issues

I also sometimes experience "No module named 'netdisco'" error when I run Configuration Check add-on.
But when I run check for second or third time, error disappears and update process is successful ...
I'm now on 0.104.2 and Xiaomi integration works without issues

This is interesting but strange - does anybody have an explanation for it?

I did the following steps to fix the issue:

  • Delete Xiaomi cube from Mi Home
  • Delete Xiaomi cube from HA
  • Restart HA
  • Run Configuration Check add-on (no errors found)
  • Run backup
  • Update HA to latest version
  • Everything works without issues.

I just tried running Configuration Check add-on twice. Got the netdisco error the first time and no error the second time. Then I updated to 0.104.2 without issues - strange but good :)

Was this page helpful?
0 / 5 - 0 ratings