home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.45k stars 30.69k forks source link

Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f3e691150>,) inside the event loop by integration 'econet' #125380

Closed dcmeglio closed 4 weeks ago

dcmeglio commented 2 months ago

The problem

Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f3e691150>,) inside the event loop by integration 'econet' at homeassistant/components/econet/init.py, line 68: api.subscribe() (offender: /usr/local/lib/python3.12/site-packages/paho/mqtt/client.py, line 806: context.load_default_certs()), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+econet%22 For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs 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 "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/econet/init.py", line 68, in async_setup_entry api.subscribe()

What version of Home Assistant Core has the issue?

2024.09

What was the last working version of Home Assistant Core?

2024.08

What type of installation are you running?

Home Assistant OS

Integration causing the issue

econet

Link to integration documentation on our website

https://www.home-assistant.io/integrations/econet/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f3e691150>,) inside the event loop by integration 'econet' at homeassistant/components/econet/__init__.py, line 68: api.subscribe() (offender: /usr/local/lib/python3.12/site-packages/paho/mqtt/client.py, line 806: context.load_default_certs()), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+econet%22 For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> 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 "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/econet/__init__.py", line 68, in async_setup_entry api.subscribe()

Additional information

https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs might provide useful information

home-assistant[bot] commented 2 months ago

Hey there @w1ll1am23, mind taking a look at this issue as it has been labeled with an integration (econet) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `econet` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign econet` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


econet documentation econet source (message by IssueLinks)

dcmeglio commented 1 month ago

I raised https://github.com/w1ll1am23/pyeconet/pull/43 which fixes the issue, but that repo has had no activity for almost a year so I'm not sure if its abandoned or what.

w1ll1am23 commented 1 month ago

Thanks for fixing this @dcmeglio I'm still around just busy, and I no longer have an econet account since I switched over to the local control espHome project. Left a comment on your PR.

dcmeglio commented 1 month ago

@w1ll1am23 great, thanks! I've considered the esphome solution but haven't made the jump yet.

w1ll1am23 commented 1 month ago

Merged and the release was successfully published. @dcmeglio can you get the Home Assistant PR opened too?

dcmeglio commented 4 weeks ago

Some unrelated test is failing. Not sure why.