Open bru73f0rc3 opened 1 month ago
try to restart your HA and see i the warning came again. on my HA i didn't see it
Yes, I see it after restart and after upgrade. Started off with a clean install of hassOS 2024.9, upgraded to 2024.10 and 2024.10.1. It's a pretty clean setup for now. Let me know if there's any data I can grab for you beyond the log.
Yes, I see it after restart and after upgrade. Started off with a clean install of hassOS 2024.9, upgraded to 2024.10 and 2024.10.1. It's a pretty clean setup for now. Let me know if there's any data I can grab for you beyond the log.
which country you use? or timezone ?
@bru73f0rc3 if you have access to sensor.py then try to copy and paste from this link : https://paste.ofcode.org/pyFHRL5ELRq4X54RJhvgYK and make restart to HA and let me know if the warning still appear..
With the new sensor.py
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pytz/zoneinfo/Africa/Abidjan', 'rb') inside the event loop by custom integration 'hebcal' at custom_components/hebcal/sensor.py, line 524: self.local_timezone = pytz.timezone(str(self._timezone)) (offender: /usr/local/lib/python3.12/site-packages/pytz/__init__.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/rt400/Jewish-Sabbaths-Holidays/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
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 189, 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/src/homeassistant/homeassistant/helpers/entity_platform.py", line 682, in _async_handle_interval_callback
self.hass.async_create_background_task(
File "/usr/src/homeassistant/homeassistant/core.py", line 861, in async_create_background_task
task = create_eager_task(target, name=name, loop=self.loop)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1041, in _async_update_entity_states
create_eager_task(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
await self.async_update()
File "/config/custom_components/hebcal/sensor.py", line 230, in async_update
await self.create_db_file()
File "/config/custom_components/hebcal/sensor.py", line 261, in create_db_file
await self.set_local_timezone()
File "/config/custom_components/hebcal/sensor.py", line 524, in set_local_timezone
self.local_timezone = pytz.timezone(str(self._timezone))
Feel free to add prints or whatever will help and i'll get back to you with results.
@bru73f0rc3 try this one : https://paste.ofcode.org/Rm74DfnmRCGmBdfRRvb6sL and let me know...
Fix looks good, tried a couple of restarts and moving back to the original to make sure the issue reproduces on demand, it does on the original, no errors on the fixed 2.5.1 version. I'll keep an eye open but i doubt anything will popup as it started producing the warnings 30s after start on the original and it's been clean now for 30m.
Thanks for fixing it! :)
Good to know... i will upload this fix to the git later. let me know if the error will popup again.
Shortly after startup i get the following:
Everything seems to be working fine except for the warning. installed via hacs, running latest, and latest hassOS with latest hass core.