-
-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Detected blocking call to open inside the event loop by integration 'environment_canada' #119084
Comments
Hey there @gwww, @michaeldavie, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) environment_canada documentation |
That explains some of the older loop blocking issues we couldn't find in this integration. Thanks for reporting |
I'm encountering the same issue, |
I have... 2024-06-13 21:09:12.121 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by integration 'environment_canada' at homeassistant/components/environment_canada/init.py, line 49: radar_data = ECRadar(coordinates=(lat, lon)) (offender: /usr/local/lib/python3.12/site-packages/PIL/ImageFont.py, line 85: with open(filename, "rb") as fp:), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+environment_canada%22 ...in my log. I'm not the sharpest tool in the drawer, but it seems relevant. Maybe it helps. |
Changes submitted to supporting library here: michaeldavie/env_canada#90. PR for HA coming after linked PR merged. |
Changes made in https://github.com/michaeldavie/env_canada/releases/tag/v0.7.0 |
closing as fixed via #120035 , target 2024.6.4 |
The problem
Received warning message on startup indicating detection of a blocking call in the event loop by the Environment Canada integration.
Message suggested to report it as an Issue.
It looks like it occurs when getting radar weather data.
What version of Home Assistant Core has the issue?
core-2024.6.0
What was the last working version of Home Assistant Core?
core-2024.5.4
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Environment Canada
Link to integration documentation on our website
https://www.home-assistant.io/integrations/environment_canada/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Detected blocking call to open inside the event loop by integration 'environment_canada' at homeassistant/components/environment_canada/__init__.py, line 49: radar_data = ECRadar(coordinates=(lat, lon)) (offender: /usr/local/lib/python3.12/site-packages/PIL/Image.py, line 3277: fp = builtins.open(filename, "rb")), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+environment_canada%22 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, 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 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/environment_canada/__init__.py", line 49, in async_setup_entry radar_data = ECRadar(coordinates=(lat, lon))
Additional information
No response
The text was updated successfully, but these errors were encountered: