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

Blocking call in event loop #146

Closed
johanzander opened this issue Nov 21, 2024 · 1 comment
Closed

Blocking call in event loop #146

johanzander opened this issue Nov 21, 2024 · 1 comment

Comments

@johanzander
Copy link

From HA logs:

2024-11-21 21:30:06.730 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/bin/python3.12', 'rb') inside the event loop by custom integration 'zaptec' at custom_components/zaptec/api.py, line 324: receiver = servicebus_client.get_subscription_receiver( (offender: /usr/local/lib/python3.12/platform.py, line 200: with open(executable, 'rb') as f:), please report it to the author of the 'zaptec' custom integration
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 "/config/custom_components/zaptec/api.py", line 324, in _stream
receiver = servicebus_client.get_subscription_receiver(
2024-11-21 21:30:06.743 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7fccf8aa6950>, '/usr/local/lib/python3.12/site-packages/certifi/cacert.pem') inside the event loop by custom integration 'zaptec' at custom_components/zaptec/api.py, line 329: async with receiver: (offender: /usr/local/lib/python3.12/site-packages/azure/servicebus/_pyamqp/aio/_transport_async.py, line 210: context.load_verify_locations(ca_certs)), please report it to the author of the 'zaptec' custom integration
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations
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 "/config/custom_components/zaptec/api.py", line 329, in _stream
async with receiver:

@sveinse
Copy link
Collaborator

sveinse commented Nov 21, 2024

Duplicate of #116, closing.

@sveinse sveinse closed this as completed Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants