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

Error: Detected blocking call #54

Open
RobusX opened this issue Mar 9, 2025 · 0 comments
Open

Error: Detected blocking call #54

RobusX opened this issue Mar 9, 2025 · 0 comments

Comments

@RobusX
Copy link

RobusX commented Mar 9, 2025

V logih HA zadnje februarske verzije 2025.5 opažam spodnje izpise. Verzija Moj elektro 0.2.6.
Sicer pa pohvale za integracijo !

2025-03-09 15:14:52.364 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/mojelektro/manifest.json', 'r') inside the event
loop by custom integration 'mojelektro' at custom_components/mojelektro/sensor.py, line 137: with open(manifest_path, 'r') as f: (offender: /config/custom_components/mojelektro/sensor.py, l
ine 137: with open(manifest_path, 'r') as f:), please create a bug report at https://github.com/frlequ/homeassistant-mojelektro/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 707, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
self._run_once()
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, 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 "/config/custom_components/mojelektro/sensor.py", line 67, in async_setup_entry
async_add_entities(sensors)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 524, in async_schedule_add_entities_for_entry
task = self.config_entry.async_create_task(
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1144, in async_create_task
task = hass.async_create_task_internal(
File "/usr/src/homeassistant/homeassistant/core.py", line 832, 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/helpers/entity_platform.py", line 658, in async_add_entities
await add_func(coros, entities, timeout)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 609, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 778, in _async_add_entity
if self.config_entry and (device_info := entity.device_info):
File "/config/custom_components/mojelektro/sensor.py", line 112, in device_info
"sw_version": self.get_version(),
File "/config/custom_components/mojelektro/sensor.py", line 137, in get_version
with open(manifest_path, 'r') as f:

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