FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
194 stars 12 forks source link

Integration Broken #6

Closed sgtsilver closed 4 years ago

sgtsilver commented 4 years ago

Version of the custom_component: 1.1.3 and also 1.1.4

Homeassistant Version: 235

Describe the bug

You can download the integration via HACS but you can't actually add it via Integrations. It just loads, a few seconds if you try it for the first time, a minute or two if you try it a second time.

Debug log


2020-08-30 21:37:07 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 112, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 69, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 117, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 526, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 321, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 75, in async_get_integration_with_requirements
    await async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 122, in async_process_requirements
    if pkg_util.is_installed(req):
  File "/usr/src/homeassistant/homeassistant/util/package.py", line 54, in is_installed
    return version(req.project_name) in req
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3144, in __contains__
    return self.specifier.contains(item, prereleases=True)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/specifiers.py", line 681, in contains
    item = parse(item)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 28, in parse
    return Version(version)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 219, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object
FL550 commented 4 years ago

Hey, I am sorry but I don't know specifical what's going wrong at your instance as these logs are not directly related to the integration. But from looking at your logs it seems like you might have network problems and a network connection is required for the setup of the integration.

sgtsilver commented 4 years ago

Any other Place I could look for any logs? Or anything that would explain the behaviour? (That was just the last stuff in the home-asstistant.log - Might be some other stuff thats complaining there...)

FL550 commented 4 years ago

Can you please send me your complete log after you tried to add the integration? Maybe I can see what's going on

sgtsilver commented 4 years ago

Just tried to add the integration and its the same stuff. Also I'd like add, that it worked for me in the previous version (or the version before of that - sorry hat a busy week..) of home assistant, and then I updated the integration and updated HA and then it went nuts. Also I tried to remove the integration, restart HA Host, add the integration, reloaded HA. Nothing else happend. I also had my PiHole in suspect but even when disabled it dosen't work.

2020-08-31 11:50:04 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for blitzortung which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-08-31 11:50:04 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-08-31 11:50:04 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for stadtreinigung_hamburg which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-08-31 11:50:13 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
2020-08-31 11:54:09 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 112, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 69, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 117, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 526, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 321, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 75, in async_get_integration_with_requirements
    await async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 122, in async_process_requirements
    if pkg_util.is_installed(req):
  File "/usr/src/homeassistant/homeassistant/util/package.py", line 54, in is_installed
    return version(req.project_name) in req
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3144, in __contains__
    return self.specifier.contains(item, prereleases=True)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/specifiers.py", line 681, in contains
    item = parse(item)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 28, in parse
    return Version(version)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 219, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object
2020-08-31 12:01:17 ERROR (MainThread) [luftdaten] Can not load data from luftdaten.info
2020-08-31 12:01:17 ERROR (MainThread) [homeassistant.components.luftdaten] Unable to retrieve data from luftdaten.info
FL550 commented 4 years ago

2020-08-31 12:01:17 ERROR (MainThread) [luftdaten] Can not load data from luftdaten.info 2020-08-31 12:01:17 ERROR (MainThread) [homeassistant.components.luftdaten] Unable to retrieve data from luftdaten.info This also indicates that you might have network problems. I can't reproduce your error on my side.

sgtsilver commented 4 years ago

2020-08-31 12:01:17 ERROR (MainThread) [luftdaten] Can not load data from luftdaten.info 2020-08-31 12:01:17 ERROR (MainThread) [homeassistant.components.luftdaten] Unable to retrieve data from luftdaten.info This also indicates that you might have network problems. I can't reproduce your error on my side.

The Luftdaten station is just crap. Dosen't send a reliable stream of data. How come every other integration (iCloud, DWD Warnings, Blitzortung and Met.no) works without a hitch?

I would like to avoid to reinstall homeassisstant. :/

FL550 commented 4 years ago

How come every other integration (iCloud, DWD Warnings, Blitzortung and Met.no) works without a hitch?

Might be related to an update I did to the underlying library which has to be fetched from pypi.org. This is done automatically if you add the integration. Maybe the other integrations haven't updated their libraries recently and are already downloaded by your instance? As already said, the error logs have nothing to do directly with dwd_weather which I can influence, so I suspect some troubles with your network.

sgtsilver commented 4 years ago

Okay - I did set up a new test server for home assistant and the integration works without any issues. So it can't be my network.

Update 2: I did a HA core rebuild and out of the blue your integration is responding. Guess we'll never know what caused the issue...

FL550 commented 4 years ago

OK, so nothing directly to do with my integration. I'm glad it's now working for you!