FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
181 stars 11 forks source link

Cannot install integration #12

Closed csoltenborn closed 3 years ago

csoltenborn commented 3 years ago

Version of home_assistant

Home Assistant Core 2021.2.2 (running on TrueNAS-12.0-U2)

Version of the custom_component

Deutscher Wetterdienst v1.1.9

Describe the bug

I installed the integration via HACS. If I then choose Configuration -> Integrations -> Add Integration and choose Deutscher Wetterdienst, the Please wait while the integration is being installed dialog disappears rather quickly (and the dialog to choose the integration reappears), and nothing else seems to happen. If I do that again, that dialog stays for (much) longer, but still nothing seems to happen. This in fact sounds a bit like #6 to me.

The log below talks about some missing packages: Error: Please make sure the libxml2 and libxslt development packages are installed. Is my Python installation lacking some packages?

Edit: Or is this the solution? Then why are these packages missing on my installation?

Debug log

Logger: aiohttp.server
Source: requirements.py:136
First occurred: 4:32:55 PM (1 occurrences)
Last logged: 4:32:55 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
    return await handler(request)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 136, in post
    return await super().post(request)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 69, in post
    result = await self._flow_mgr.async_init(
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 119, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/config_entries.py", line 541, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/setup.py", line 343, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/requirements.py", line 79, in async_get_integration_with_requirements
    await async_process_requirements(
  File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/requirements.py", line 136, in async_process_requirements
    raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for dwd_weather not found: ['simple_dwd_weatherforecast==1.0.6'].

Logger: homeassistant.util.package
Source: util/package.py:85
First occurred: 4:32:55 PM (1 occurrences)
Last logged: 4:32:55 PM

Unable to install package simple_dwd_weatherforecast==1.0.6: ERROR: Command errored out with exit status 1: command: /usr/local/share/homeassistant/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vnzl8z96/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vnzl8z96/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-s7aoos8x cwd: /tmp/pip-install-vnzl8z96/lxml/ Complete output (3 lines): Building lxml version 4.6.2. Building without Cython. Error: Please make sure the libxml2 and libxslt development packages are installed. ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available. You should consider upgrading via the '/usr/local/share/homeassistant/bin/python3.8 -m pip install --upgrade pip' command.
FL550 commented 3 years ago

I think your system (TrueNAS-12.0-U2) is missing the required packages as you already mentioned. Maybe these are not included in the first place, because your system is focussed on running mainly as a NAS.

Can you please install the packages? sudo apt-get install libxml2-dev libxslt-dev python-dev and maybe also libxslt1-dev

Is it working afterwards?

csoltenborn commented 3 years ago

The solution was in fact even easier: I figured that I'd update the Home Assistant Jail's OS (TrueNAS is based on FreeBSD, Home Assistant is running in a jail, which is a very light-weight "VM"). Afterwards, I wanted to install the packages, but they were not known to the backing repository. I thought that I tried to add the integration anyways, and now it works. My guess is that the packages are not known to the backing package repository explicitly, but have been installed as dependencies during the update. But that's just a guess - I'm a Windows guy myself, so this is all a bit strange to me. Thanks for your fast help anyways (and for the integration :-) )!

Works like a charm now. I am just a bit confused about the selected weather station (based on the displayed coordinates, which appear to be fine according to Google Maps). Can I maybe drop you an email because of that? I don't want to reveal my exact location on GitHub...

Despite that: issue can be closed from my point of view.

FL550 commented 3 years ago

Ok, thanks for your response.

Sure, but I would prefer Discord rather than publishing my Email address here on GitHub. If you have Discord, you can contact me there: FL550#6993

csoltenborn commented 3 years ago

Ok, I've sent you a friend request on Discord (I guess that's needed to communicate - I am not an experienced Discord user, to put it mildly).