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
73.22k stars 30.58k forks source link

Python issue #75155

Closed caveman85 closed 2 years ago

caveman85 commented 2 years ago

The problem

File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 240, in _async_init flow = await self.async_create_flow(handler, context=context, data=data) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 776, in async_create_flow raise data_entry_flow.UnknownHandler from err homeassistant.data_entry_flow.UnknownHandler

What version of Home Assistant Core has the issue?

2022.7.3

What was the last working version of Home Assistant Core?

2022.6.0

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

middleagedman commented 2 years ago

Got exact same issue today on brand new install os: arch linux home-assistant 1:2022.7.4-2 python-home-assistant-frontend 20220127.0-1

Going through initial setup, configuring timezone/currency, etc. Error in logs


Jul 21 14:36:49 mini hass[56725]: 2022-07-21 14:36:49 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform homeassistant.components.radio_browser.config_flow
Jul 21 14:36:49 mini hass[56725]: Traceback (most recent call last):
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/loader.py", line 618, in get_platform
Jul 21 14:36:49 mini hass[56725]:     cache[full_name] = self._import_platform(platform_name)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/loader.py", line 635, in _import_platform
Jul 21 14:36:49 mini hass[56725]:     return importlib.import_module(f"{self.pkg_path}.{platform_name}")
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
Jul 21 14:36:49 mini hass[56725]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/radio_browser/__init__.py", line 4, in <module>
Jul 21 14:36:49 mini hass[56725]:     from radios import RadioBrowser, RadioBrowserError
Jul 21 14:36:49 mini hass[56725]:   File "/var/lib/hass/deps/lib/python3.10/site-packages/radios/__init__.py", line 8, in <module>
Jul 21 14:36:49 mini hass[56725]:     from .models import Country, Language, Station, Stats, Tag
Jul 21 14:36:49 mini hass[56725]:   File "/var/lib/hass/deps/lib/python3.10/site-packages/radios/models.py", line 7, in <module>
Jul 21 14:36:49 mini hass[56725]:     import pycountry
Jul 21 14:36:49 mini hass[56725]:   File "/var/lib/hass/deps/lib/python3.10/site-packages/pycountry/__init__.py", line 13, in <module>
Jul 21 14:36:49 mini hass[56725]:     __version__ = pkg_resources.get_distribution("pycountry").version
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 477, in get_distribution
Jul 21 14:36:49 mini hass[56725]:     dist = get_provider(dist)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 353, in get_provider
Jul 21 14:36:49 mini hass[56725]:     return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 897, in require
Jul 21 14:36:49 mini hass[56725]:     needed = self.resolve(parse_requirements(requirements))
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 783, in resolve
Jul 21 14:36:49 mini hass[56725]:     raise DistributionNotFound(req, requirers)
Jul 21 14:36:49 mini hass[56725]: pkg_resources.DistributionNotFound: The 'pycountry' distribution was not found and is required by the application
Jul 21 14:36:49 mini hass[56725]: 2022-07-21 14:36:49 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration radio_browser: Exception importing homeassistant.components.radio_browser.config_flow
Jul 21 14:36:49 mini hass[56725]: 2022-07-21 14:36:49 ERROR (MainThread) [aiohttp.server] Error handling request
Jul 21 14:36:49 mini hass[56725]: Traceback (most recent call last):
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/loader.py", line 618, in get_platform
Jul 21 14:36:49 mini hass[56725]:     cache[full_name] = self._import_platform(platform_name)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/loader.py", line 635, in _import_platform
Jul 21 14:36:49 mini hass[56725]:     return importlib.import_module(f"{self.pkg_path}.{platform_name}")
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
Jul 21 14:36:49 mini hass[56725]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
Jul 21 14:36:49 mini hass[56725]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/radio_browser/__init__.py", line 4, in <module>
Jul 21 14:36:49 mini hass[56725]:     from radios import RadioBrowser, RadioBrowserError
Jul 21 14:36:49 mini hass[56725]:   File "/var/lib/hass/deps/lib/python3.10/site-packages/radios/__init__.py", line 8, in <module>
Jul 21 14:36:49 mini hass[56725]:     from .models import Country, Language, Station, Stats, Tag
Jul 21 14:36:49 mini hass[56725]:   File "/var/lib/hass/deps/lib/python3.10/site-packages/radios/models.py", line 7, in <module>
Jul 21 14:36:49 mini hass[56725]:     import pycountry
Jul 21 14:36:49 mini hass[56725]:   File "/var/lib/hass/deps/lib/python3.10/site-packages/pycountry/__init__.py", line 13, in <module>
Jul 21 14:36:49 mini hass[56725]:     __version__ = pkg_resources.get_distribution("pycountry").version
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 477, in get_distribution
Jul 21 14:36:49 mini hass[56725]:     dist = get_provider(dist)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 353, in get_provider
Jul 21 14:36:49 mini hass[56725]:     return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 897, in require
Jul 21 14:36:49 mini hass[56725]:     needed = self.resolve(parse_requirements(requirements))
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 783, in resolve
Jul 21 14:36:49 mini hass[56725]:     raise DistributionNotFound(req, requirers)
Jul 21 14:36:49 mini hass[56725]: pkg_resources.DistributionNotFound: The 'pycountry' distribution was not found and is required by the application
Jul 21 14:36:49 mini hass[56725]: The above exception was the direct cause of the following exception:
Jul 21 14:36:49 mini hass[56725]: Traceback (most recent call last):
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/config_entries.py", line 782, in async_create_flow
Jul 21 14:36:49 mini hass[56725]:     integration.get_platform("config_flow")
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/loader.py", line 627, in get_platform
Jul 21 14:36:49 mini hass[56725]:     raise ImportError(
Jul 21 14:36:49 mini hass[56725]: ImportError: Exception importing homeassistant.components.radio_browser.config_flow
Jul 21 14:36:49 mini hass[56725]: During handling of the above exception, another exception occurred:
Jul 21 14:36:49 mini hass[56725]: Traceback (most recent call last):
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
Jul 21 14:36:49 mini hass[56725]:     resp = await request_handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
Jul 21 14:36:49 mini hass[56725]:     resp = await handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
Jul 21 14:36:49 mini hass[56725]:     return await handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
Jul 21 14:36:49 mini hass[56725]:     return await handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
Jul 21 14:36:49 mini hass[56725]:     return await handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
Jul 21 14:36:49 mini hass[56725]:     return await handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/http/ban.py", line 79, in ban_middleware
Jul 21 14:36:49 mini hass[56725]:     return await handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/http/auth.py", line 236, in auth_middleware
Jul 21 14:36:49 mini hass[56725]:     return await handler(request)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/http/view.py", line 136, in handle
Jul 21 14:36:49 mini hass[56725]:     result = await result
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/components/onboarding/views.py", line 208, in post
Jul 21 14:36:49 mini hass[56725]:     await asyncio.gather(
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/data_entry_flow.py", line 222, in async_init
Jul 21 14:36:49 mini hass[56725]:     flow, result = await task
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/data_entry_flow.py", line 240, in _async_init
Jul 21 14:36:49 mini hass[56725]:     flow = await self.async_create_flow(handler, context=context, data=data)
Jul 21 14:36:49 mini hass[56725]:   File "/usr/lib/python3.10/site-packages/homeassistant/config_entries.py", line 789, in async_create_flow
Jul 21 14:36:49 mini hass[56725]:     raise data_entry_flow.UnknownHandler
Jul 21 14:36:49 mini hass[56725]: homeassistant.data_entry_flow.UnknownHandler
middleagedman commented 2 years ago

I installed python-pycountry package and restarted home-assistant, and it seemed to continue through the onboarding process

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.