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

Detected blocking call to import_module inside the event loop by integration 'environment_canada' #116425

Closed
jazzyisj opened this issue Apr 29, 2024 · 7 comments

Comments

@jazzyisj
Copy link

The problem

WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by integration 'environment_canada' at homeassistant/components/environment_canada/__init__.py, line 117: await self.ec_data.update() (offender: /usr/local/lib/python3.12/site-packages/imageio/config/plugins.py, line 100: module = importlib.import_module(self.module_name, self.package_name)), 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

What version of Home Assistant Core has the issue?

core-2024.5.0b3

What was the last working version of Home Assistant Core?

core-2024.4.4

What type of installation are you running?

Home Assistant OS

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?

No response

Additional information

No response

@home-assistant
Copy link

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

Code owner commands

Code owners of environment_canada 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 environment_canada 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)


environment_canada documentation
environment_canada source
(message by IssueLinks)

@frenck frenck added this to the 2024.5.0 milestone Apr 29, 2024
@gwww
Copy link
Contributor

gwww commented Apr 30, 2024

Call is here: https://github.com/imageio/imageio/blob/master/imageio/config/plugins.py#L100

I see a few issues with the same call to import_module. I'm unsure what a fix is, and in this case this is in another library (imageio), but it does seem to have some active development.

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

The import needs to run in the executor

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

Example art

frenck/spook#722
Fix smartthings doing I/O in the event loop to import platforms (#116190)
Import zha quirks in the executor (#114685)

@Anto79-ops
Copy link

wanted to bring this into here, in case its related you can close this old one too.

#92252

if its not related. sorry for polluting this.

@gwww
Copy link
Contributor

gwww commented Apr 30, 2024

The link to the old issue is helpful. @michaeldavie seems like the best place to fix this is in env_canada lib. Thoughts?

@gwww
Copy link
Contributor

gwww commented May 4, 2024

@home-assistant close

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

No branches or pull requests

6 participants