-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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 'radio_browser' #118618
Comments
Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) radio_browser documentation |
It looks like it will lazy load the countries db in the event loop for https://github.com/pycountry/pycountry/blob/494a4b4c3c567650b877acd808b7ed60af0063cd/src/pycountry/__init__.py#L285 |
Maybe the simplest fix would be to get the |
Thanks for reporting. This explains an event loop blocking problem I was trying to track down that I could never pin down that was leading to another issue. |
Have a similar issue here: "Detected blocking call to open inside the event loop by integration 'ps4'" Related? Bob. |
The problem
Can reproduce this simply by opening media browser in sidebar and then clicking on Radio Browser. Below warning gets added to logs when it initially populates the list of radio stations.
Detected blocking call to open inside the event loop by integration 'radio_browser' at homeassistant/components/radio_browser/media_source.py, line 148: countries = await radios.countries(order=Order.NAME) (offender: /usr/local/lib/python3.12/site-packages/pycountry/db.py, line 103: with open(self.filename, encoding="utf-8") as f:), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+radio_browser%22
What version of Home Assistant Core has the issue?
2024.6.0b4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Radio Browser
Link to integration documentation on our website
https://www.home-assistant.io/integrations/radio_browser/
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
The text was updated successfully, but these errors were encountered: