Skip to content

[homeassistant.util.loop] Detected blocking call to import_module with args #31

@danielholm

Description

@danielholm

Hi,

In latest HA 2025.1 I get the following error in logs. The sensors keep working, however.
2025-01-05 16:47:05.866 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('dateparser.data.date_translation_data.en',) inside the event loop by custom integration 'resrobot' at custom_components/resrobot/sensor.py, line 120: time = dateparser.parse("in " + str(time_offset) + " minutes") (offender: /usr/local/lib/python3.13/site-packages/dateparser/languages/loader.py, line 215: import_module("dateparser.data.date_translation_data." + lang),), please create a bug report at https://github.com/TekniskSupport/home-assistant-resrobot/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 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 "/usr/src/homeassistant/homeassistant/config_entries.py", line 2366, in _async_forward_entry_setup
result = await async_setup_component(
File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component
result = await _async_setup_component(hass, domain, config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 416, in async_setup_component
result = await task
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 90, in async_setup
await component.async_setup(config)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 150, in async_setup
self.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_component.py", line 311, in async_setup_platform
await self._platforms[key].async_setup(platform_config, discovery_info)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 303, in async_setup
await self._async_setup_platform(async_create_setup_awaitable)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in async_setup_platform
awaitable = create_eager_task(awaitable, loop=hass.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 "/config/custom_components/resrobot/sensor.py", line 80, in async_setup_platform
await add_sensors(
File "/config/custom_components/resrobot/sensor.py", line 120, in add_sensors
time = dateparser.parse("in " + str(time_offset) + " minutes")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions