briis / smartweather

WeatherFlow Smart Weather Component for Home Assistant
MIT License
110 stars 11 forks source link

Doesn't Install in Home Assistant 2021.3.4 #65

Closed jdrews417 closed 3 years ago

jdrews417 commented 3 years ago

After adding the plugin from HACS, going to integration and installing results in a dialog box:

Config flow could not be loaded

The HA Logs show:

2021-03-23 20:53:13 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 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, 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/security_filter.py", line 56, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, 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 117, 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 122, in async_init flow = await self.async_create_flow(handler, context=context, data=data) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 558, in async_create_flow await async_process_deps_reqs(self.hass, self._hass_config, integration) File "/usr/src/homeassistant/homeassistant/setup.py", line 343, in async_process_deps_reqs await requirements.async_get_integration_with_requirements( File "/usr/src/homeassistant/homeassistant/requirements.py", line 79, in async_get_integration_with_requirements await async_process_requirements( File "/usr/src/homeassistant/homeassistant/requirements.py", line 126, in async_process_requirements if pkg_util.is_installed(req): File "/usr/src/homeassistant/homeassistant/util/package.py", line 44, in is_installed return version(req.project_name) in req File "/usr/local/lib/python3.8/site-packages/pkg_resources/init.py", line 3129, in contains return self.specifier.contains(item, prereleases=True) File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/specifiers.py", line 789, in contains item = parse(item) File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 56, in parse return Version(version) File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 275, in init match = self._regex.search(version) TypeError: expected string or bytes-like object

briis commented 3 years ago

I just tried to install the latest version on two different clean instances of HA, and I cannot replicate your error. The error messages don't make me any wiser, except that HA is throwing the error, and not the Integration.

Only suggestion I have is deinstall the Integration from HACS, ensure that the smartweather directory under custom_components is gone, then restart HA and try to install from HACS again.

jdrews417 commented 3 years ago

Tried that (multiple times).

Today I told HA to go back to version 2021.3.3, and the install worked just fine. shrug

briis commented 3 years ago

Really strange, as I tried it on a new 2021.3.4 without problems. Let me know if you get issues when upgrading.

jdrews417 commented 3 years ago

upgraded just fine (but don't have to re-install the integration). Appears to be pulling in data just fine. Thanks for the great integrations!

briis commented 3 years ago

I will close this now, just reopen if you run in to this again.

brentpabst commented 3 years ago

I'm seeing the same behavior on the latest version. Running the latest HA and HASSIO versions and the integration "installs" but does not prompt for any install options and cannot be configured after installation.

briis commented 3 years ago

As I stated above this is damn hard to troubleshoot, as I have not been able to recreate it, no matter how many times I have tried to install it. But I will have another look in the Config Flow code, to see if there could be something there that prevents it to load. One quick question: What language have you set in Home Assistant?

brentpabst commented 3 years ago

@briis is there anything on my end that would be helpful to share in troubleshooting?

jdrews417 commented 3 years ago

For my case, "English" is the installed language, nothing else.

Version core-2021.3.4
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
Virtual Environment false
Python Version 3.8.7
Operating System Family Linux
Operating System Version 5.4.83-v8
CPU Architecture aarch64
Timezone America/Chicago
briis commented 3 years ago

Could be good if you could turn on the debug option for this integration. Open your configuration.yaml file, and look for logger: If it is already there, add this below:

logger:
  logs:
    custom_components.smartweather: debug

else add this

logger:
  default: error
  logs:
    custom_components.smartweather: debug

Then restart HA, and try to install the Integration again, and let me know if something shows in the log.

chrismcneil commented 3 years ago

Sadly I am hitting this issue too. I am running homeassistant docker container. HACS shows it installed but it doesn't show up in integrations at all. If I check the files look to be there under custom_components folder. I have tried both logging settings and there is nothing about smart weather showing up in the logs.

briis commented 3 years ago

@chrismcneil If you just installed the integration through HACS, then go to the Integrations page, and do a hard refresh of that page, and then try and search for it again. If it is not available under integrations, this is always a caching issue.

brentpabst commented 3 years ago

Quick update on my end, updated to the latest supervisor and core release and the integration installed without issue and is working properly. Not sure what HA or my local instance did but I'm all set here.

briis commented 3 years ago

Thanks for the update @brentpabst.