Home-Assistant-Mail-And-Packages: ISSUE: Event Looping Error after Home Assistant version 2024.6.x

Describe the bug Detected blocking call to open inside the event loop by custom integration ‘mail_and_packages’ at custom_components/mail_and_packages/helpers.p

Environment (please complete the following information):

  • OS: HAOS
  • Type of device: Unraid VM
  • Home Assistant version: 2024.6.1
  • Supervisor: 2024.06.0
  • Component version: 0.3.27

Logs

Source: util/loop.py:84
First occurred: 12:49:32 PM (98 occurrences)
Last logged: 9:43:01 PM

Detected blocking call to open inside the event loop by custom integration 'mail_and_packages' at custom_components/mail_and_packages/helpers.py, line 1148: with open(filepath, "wb") as the_file: (offender: /config/custom_components/mail_and_packages/helpers.py, line 1148: with open(filepath, "wb") as the_file:), please create a bug report at https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/issues 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 "/config/custom_components/mail_and_packages/helpers.py", line 1148, in download_img with open(filepath, "wb") as the_file:```

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15

Most upvoted comments

@firstof9 I’ve not had any issues since upgrading to version 0.3.29b1.

@firstof9 no errors in the logs after restarting with 0.3.29b1. I’ll check back in a couple of hours and will let you know if I see anything in the logs.

@firstof9 system didn’t crash, but I do see this in the logs now:

Logger: homeassistant.util.loop
Source: util/loop.py:84
First occurred: 5:09:22 PM (1 occurrences)
Last logged: 5:09:22 PM

Detected blocking call to open inside the event loop by custom integration 'mail_and_packages' at custom_components/mail_and_packages/helpers.py, line 1184: with open(filepath, "wb") as the_file: (offender: /config/custom_components/mail_and_packages/helpers.py, line 1184: with open(filepath, "wb") as the_file:), please create a bug report at https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/issues 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 "/config/custom_components/mail_and_packages/helpers.py", line 1184, in download_img with open(filepath, "wb") as the_file:

I don’t know if https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/issues/906#issuecomment-2184243018 has resolved, need to leave the addon on for a few hours to see what happens.

@lazyboy0172 I had to restore from a backup as well, the update literally bricked my VM. There weren’t any issues in the VM logs, the UI just wouldn’t load. There are definitely issues with the addon since the update to HA 2024.6.x and 0.3.26. It’s causing instability for a ton of other addons on top of other issues.

I was hoping to get one more PR in before release for a new feature, but looks like that one will have to wait. I’ll tag a release shortly.