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

Warning: Detected blocking call inside the event loop by custom integration #277

Open
lifuhuang opened this issue Dec 27, 2024 · 0 comments

Comments

@lifuhuang
Copy link

Current version: 1.0.4

`Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 12:46:50 PM (2 occurrences)
Last logged: 12:46:50 PM

Detected blocking call to open with args ('/usr/local/bin/python3.13', 'rb') inside the event loop by custom integration 'extended_openai_conversation' at custom_components/extended_openai_conversation/init.py, line 364: response: ChatCompletion = await self.client.chat.completions.create( (offender: /usr/local/lib/python3.13/platform.py, line 204: with open(executable, 'rb') as f:), please create a bug report at https://github.com/jekalmin/extended_openai_conversation/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 227, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 213, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 708, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 679, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2027, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/websocket_api.py", line 251, in websocket_run run_task = hass.async_create_task(pipeline_input.execute()) File "/usr/src/homeassistant/homeassistant/core.py", line 819, in async_create_task return self.async_create_task_internal(target, name, eager_start) File "/usr/src/homeassistant/homeassistant/core.py", line 841, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1476, in execute tts_input = await self.run.recognize_intent( File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1078, in recognize_intent conversation_result = await conversation.async_converse( File "/usr/src/homeassistant/homeassistant/components/conversation/agent_manager.py", line 110, in async_converse result = await method(conversation_input) File "/config/custom_components/extended_openai_conversation/init.py", line 199, in async_process query_response = await self.query(user_input, messages, exposed_entities, 0) File "/config/custom_components/extended_openai_conversation/init.py", line 364, in query response: ChatCompletion = await self.client.chat.completions.create(
Detected blocking call to open with args ('/etc/os-release',) inside the event loop by custom integration 'extended_openai_conversation' at custom_components/extended_openai_conversation/init.py, line 364: response: ChatCompletion = await self.client.chat.completions.create( (offender: /usr/local/lib/python3.13/site-packages/distro/distro.py, line 1099: with open(self.os_release_file, encoding="utf-8") as release_file:), please create a bug report at https://github.com/jekalmin/extended_openai_conversation/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 227, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 213, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 708, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 679, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2027, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/websocket_api.py", line 251, in websocket_run run_task = hass.async_create_task(pipeline_input.execute()) File "/usr/src/homeassistant/homeassistant/core.py", line 819, in async_create_task return self.async_create_task_internal(target, name, eager_start) File "/usr/src/homeassistant/homeassistant/core.py", line 841, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1476, in execute tts_input = await self.run.recognize_intent( File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1078, in recognize_intent conversation_result = await conversation.async_converse( File "/usr/src/homeassistant/homeassistant/components/conversation/agent_manager.py", line 110, in async_converse result = await method(conversation_input) File "/config/custom_components/extended_openai_conversation/init.py", line 199, in async_process query_response = await self.query(user_input, messages, exposed_entities, 0) File "/config/custom_components/extended_openai_conversation/init.py", line 364, in query response: ChatCompletion = await self.client.chat.completions.create(`

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

1 participant