Skip to content

Blocking Call urllib3.contrib.resolver #1734

Description

@wanltz

Describe the bug
The dreame_vacuum custom integration is calling a blocking urllib3.contrib.resolver inside the event loop by custom integration 'dreame_vacuum' at custom_components/dreame_vacuum/dreame/protocol.py

To Reproduce
N/A. The warning appears at Home Assistant startup.

Expected behavior
N/A

Screenshots
N/A

Additional Information (please complete the following information)

  • Model Name: xiaomi.vacuum.c102gl
  • Firmware Version: 4.5.6_1087
  • Home Assistant Version: 2026.7.4
  • Configuration Type [With or without map support]: with map support
  • Errors or warnings shown in the HA logs (if applicable):

Logger: homeassistant.util.loop
Source: util/loop.py:135
Première occurrence: 01:02:11 (1 occurrence)
Dernier enregistrement: 01:02:11

Detected blocking call to import_module with args ('.system', 'urllib3.contrib.resolver') inside the event loop by custom integration 'dreame_vacuum' at custom_components/dreame_vacuum/dreame/protocol.py, line 815: self._session = requests.session() (offender: /usr/local/lib/python3.14/site-packages/urllib3/contrib/resolver/factories.py, line 33: resolver_module = importlib.import_module(), please create a bug report at https://github.com/Tasshack/dreame-vacuum/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module Traceback (most recent call last): File "", line 203, 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 289, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.14/asyncio/base_events.py", line 706, in run_until_complete self.run_forever() File "/usr/local/lib/python3.14/asyncio/base_events.py", line 677, in run_forever self._run_once() File "/usr/local/lib/python3.14/asyncio/base_events.py", line 2056, in _run_once handle._run() File "/usr/local/lib/python3.14/asyncio/events.py", line 94, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/setup.py", line 168, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/usr/src/homeassistant/homeassistant/setup.py", line 470, in async_setup_component await asyncio.gather( File "/usr/src/homeassistant/homeassistant/setup.py", line 472, in create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async.py", line 42, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 967, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 704, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 798, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/dreame_vacuum/init.py", line 39, in async_setup_entry coordinator = DreameVacuumDataUpdateCoordinator(hass, entry=entry) File "/config/custom_components/dreame_vacuum/coordinator.py", line 158, in init self._device = DreameVacuumDevice( File "/config/custom_components/dreame_vacuum/dreame/device.py", line 485, in init self._protocol = DreameVacuumProtocol( File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 1790, in init self.cloud = DreameVacuumMiHomeCloudProtocol(username, password, country, auth_key, device_id) File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 815, in init self._session = requests.session()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions