home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.59k stars 29.91k forks source link

Unable to import component xiaomi_aqara after upgrade to 0.103.0 #29866

Closed roofburner closed 4 years ago

roofburner commented 4 years ago

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:

roofburner commented 4 years ago

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?

probot-home-assistant[bot] commented 4 years ago

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!

Smandurlo commented 4 years ago

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

bazyl78 commented 4 years ago

On hassio all integrations using netdisco are broken:

Failed config General Errors:

mdieperink commented 4 years ago

Same here, using hassio

insajd commented 4 years ago

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

insajd commented 4 years ago

Issue is gone on 0.103.2 for me

fazmanian commented 4 years ago

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.

watermarkhu commented 4 years ago

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

larsenglund commented 4 years ago

Same issue on 0.103.6 on hassio.

insajd commented 4 years ago

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

kadu commented 4 years ago

Same issue on 0.103.6 on hassio.

charlietomo commented 4 years ago

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.

delicon commented 4 years ago

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

MrUkleja commented 4 years ago

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

charlietomo commented 4 years ago

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?

DrBlokmeister commented 4 years ago

I did the following steps to fix the issue:

larsenglund commented 4 years ago

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 :)