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
71.06k stars 29.72k forks source link

Warning inside logs: home assistant.util.loop, util.loop.py:77 frozen runpy #121751

Closed nagtegaal closed 1 month ago

nagtegaal commented 1 month ago

The problem

In the logs: Logger: homeassistant.util.loop Bron: util/loop.py:77 Eerst voorgekomen: 10 juli 2024 om 14:07:41 (1 gebeurtenissen) Laatst gelogd: 10 juli 2024 om 14:07:41

Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pytz/zoneinfo/Africa/Abidjan', 'rb') in /usr/local/lib/python3.12/site-packages/pytz/init.py, line 108: return open(filename, 'rb') inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open 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 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 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/local/lib/python3.12/asyncio/selector_events.py", line 960, in _read_ready self._read_ready_cb() File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 1017, in _read_readydata_received self._protocol.data_received(data) File "/usr/local/lib/python3.12/site-packages/dsmr_parser/clients/protocol.py", line 133, in data_received self.handle_telegram(telegram) File "/usr/local/lib/python3.12/site-packages/dsmr_parser/clients/protocol.py", line 159, in handle_telegram parsed_telegram = self.telegram_parser.parse(telegram) File "/usr/local/lib/python3.12/site-packages/dsmr_parser/parsers.py", line 95, in parse dsmr_object = object["value_parser"].parse(match) File "/usr/local/lib/python3.12/site-packages/dsmr_parser/parsers.py", line 242, in parse values=self._parse(line) File "/usr/local/lib/python3.12/site-packages/dsmr_parser/parsers.py", line 219, in _parse return self._parse_values(values) File "/usr/local/lib/python3.12/site-packages/dsmr_parser/parsers.py", line 190, in _parse_values return [self.value_formats[i].parse(value) File "/usr/local/lib/python3.12/site-packages/dsmr_parser/parsers.py", line 399, in parse value = self.coerce_type(value) if value is not None else value File "/usr/local/lib/python3.12/site-packages/dsmr_parser/value_types.py", line 24, in timestamp local_tz = pytz.timezone('Europe/Amsterdam') File "/usr/local/lib/python3.12/site-packages/pytz/init.py", line 181, in timezone if zone in all_timezones_set: # noqa File "/usr/local/lib/python3.12/site-packages/pytz/lazy.py", line 154, in _lazy for i in fill_iter.pop(): File "/usr/local/lib/python3.12/site-packages/pytz/lazy.py", line 101, in _lazy list.extend(self, fill_iter.pop()) File "/usr/local/lib/python3.12/site-packages/pytz/init.py", line 1115, in tz for tz in _all_timezones_unchecked if resource_exists(tz)) File "/usr/local/lib/python3.12/site-packages/pytz/init.py", line 121, in resource_exists open_resource(name).close() File "/usr/local/lib/python3.12/site-packages/pytz/init__.py", line 108, in open_resource return open(filename, 'rb')

What version of Home Assistant Core has the issue?

core-2024.7.2

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

DSMR

Link to integration documentation on our website

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

Diagnostics information

N/A

Example YAML snippet

There is no YAML needed for this bug/warning. Just use the DSMR core integration.

Anything in the logs that might be useful for us?

The error message is inside the System-logs of Home Assistant

Additional information

Not sure with what version this warning has been introduced.

home-assistant[bot] commented 1 month ago

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

Code owner commands Code owners of `dsmr` 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 dsmr` 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)


dsmr documentation dsmr source (message by IssueLinks)