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

Fix blocking call to listdir inside the event loop #730

Closed
Suxsem opened this issue Jul 16, 2024 · 1 comment
Closed

Fix blocking call to listdir inside the event loop #730

Suxsem opened this issue Jul 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Suxsem
Copy link

Suxsem commented Jul 16, 2024

WebRtc 3.5.2

Detected blocking call to listdir with args ('/root/.homeassistant',) inside the event loop by custom integration 'webrtc' at custom_components/webrtc/utils.py, line 75: for file in os.listdir(hass.config.config_dir): (offender: /root/.homeassistant/custom_components/webrtc/utils.py, line 75: for file in os.listdir(hass.config.config_dir):), please create a bug report at https://github.com/AlexxIT/WebRTC/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#listdir Traceback (most recent call last): File "/srv/homeassistant/bin/hass", line 8, in <module> sys.exit(main()) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/base_events.py", line 1985, in _run_once handle._run() File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/config_entries.py", line 734, in async_setup_locked await self.async_setup(hass, integration=integration) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/config_entries.py", line 586, in async_setup result = await component.async_setup_entry(hass, self) File "/root/.homeassistant/custom_components/webrtc/__init__.py", line 138, in async_setup_entry binary = await utils.validate_binary(hass) File "/root/.homeassistant/custom_components/webrtc/utils.py", line 75, in validate_binary for file in os.listdir(hass.config.config_dir):

Detected blocking call to open with args ('/root/.homeassistant/go2rtc-1.8.4', 'wb') inside the event loop by custom integration 'webrtc' at custom_components/webrtc/utils.py, line 97: with open(filename, "wb") as f: (offender: /root/.homeassistant/custom_components/webrtc/utils.py, line 97: with open(filename, "wb") as f:), please create a bug report at https://github.com/AlexxIT/WebRTC/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "/srv/homeassistant/bin/hass", line 8, in <module> sys.exit(main()) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/base_events.py", line 1985, in _run_once handle._run() File "/root/.pyenv/versions/3.12.2/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/config_entries.py", line 734, in async_setup_locked await self.async_setup(hass, integration=integration) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/config_entries.py", line 586, in async_setup result = await component.async_setup_entry(hass, self) File "/root/.homeassistant/custom_components/webrtc/__init__.py", line 138, in async_setup_entry binary = await utils.validate_binary(hass) File "/root/.homeassistant/custom_components/webrtc/utils.py", line 97, in validate_binary with open(filename, "wb") as f:
@AlexxIT AlexxIT added the bug Something isn't working label Jul 17, 2024
@AlexxIT AlexxIT self-assigned this Jul 17, 2024
@AlexxIT AlexxIT changed the title HA 2024.7.2: Detected blocking call to listdir with args ('/root/.homeassistant',) inside the event loop Fix blocking call to listdir inside the event loop Sep 8, 2024
@AlexxIT AlexxIT added this to the v3.6.0 milestone Sep 8, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 12, 2024

https://github.com/AlexxIT/WebRTC/releases/tag/v3.6.0

@AlexxIT AlexxIT closed this as completed Oct 12, 2024
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

2 participants