Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detected code that calls async_forward_entry_setup for integration hon #263

Open
rwez opened this issue Nov 7, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@rwez
Copy link

rwez commented Nov 7, 2024

Describe the bug
homeassistant does not finish setup and below error in log:

2024-11-07 12:40:39.766 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration hon with title: @.* and entry_id: ***************, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Go to terminal and open home-asssistant.log
  2. See error

Expected behavior
no error and home-assistant starting up normally.

Environment (please complete the following information):

  • Home Assistant Version: 2024.11.0
  • hOn Integration Version: 0.14.0
  • pyhOn Version 0.14.0

Additional context
problem started after updating homeassistant to 2024.11.0

Home Assistant Logs
Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 12:40:12 PM (4 occurrences)
Last logged: 12:40:33 PM

Detected blocking call to import_module with args ('pyhon.appliances.wc',) inside the event loop by custom integration 'hon' at custom_components/hon/init.py, line 34: hon = await Hon( (offender: /usr/local/lib/python3.12/site-packages/pyhon/appliance.py, line 52: self._extra: Optional[ApplianceBase] = importlib.import_module(), please create a bug report at https://github.com/Andre0512/hon/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 783, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 546, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/hon/init.py", line 34, in async_setup_entry hon = await Hon(
Detected blocking call to listdir with args ('/config',) inside the event loop by custom integration 'hon' at custom_components/hon/init.py, line 34: hon = await Hon( (offender: /usr/local/lib/python3.12/site-packages/pkg_resources/init.py, line 2225: return os.listdir(path)), please create a bug report at https://github.com/Andre0512/hon/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#listdir Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 783, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 546, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/hon/init.py", line 34, in async_setup_entry hon = await Hon(
Detected blocking call to listdir with args ('/usr/local/lib/python3.12/site-packages/AEMET_OpenData-0.5.4.dist-info',) inside the event loop by custom integration 'hon' at custom_components/hon/init.py, line 34: hon = await Hon( (offender: /usr/local/lib/python3.12/site-packages/pkg_resources/init.py, line 2239: if len(os.listdir(path)) == 0:), please create a bug report at https://github.com/Andre0512/hon/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#listdir Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 783, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 546, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/hon/init.py", line 34, in async_setup_entry hon = await Hon(
Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/azure_kusto_data-4.5.1.dist-info/namespace_packages.txt', 'rb') inside the event loop by custom integration 'hon' at custom_components/hon/init.py, line 34: hon = await Hon( (offender: /usr/local/lib/python3.12/site-packages/pkg_resources/init.py, line 1761: with open(path, 'rb') as stream:), please create a bug report at https://github.com/Andre0512/hon/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 783, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 546, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/hon/init.py", line 34, in async_setup_entry hon = await Hon(

@rwez rwez added the bug Something isn't working label Nov 7, 2024
@kubasaw
Copy link

kubasaw commented Nov 7, 2024

Duplicate of #249

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants