You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2025-03-06 16:39:41.825 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.13/site-packages/pytz/zoneinfo/Africa/Abidjan', 'rb') inside the event loop by custom integration 'pyscript' at custom_components/pyscript/eval.py, line 1982: return func(*args, **kwargs) (offender: /usr/local/lib/python3.13/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/custom-components/pyscript/issues
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 227, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 213, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
self._run_once()
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
handle._run()
File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
self._context.run(self._callback, *self._args)
File "/config/custom_components/pyscript/function.py", line 448, in run_coro
result = await coro
File "/config/custom_components/pyscript/trigger.py", line 1380, in do_func_call
await ast_ctx.call_func(func, None, **kwargs)
File "/config/custom_components/pyscript/eval.py", line 1952, in call_func
return await func.call(self, *args, **kwargs)
File "/config/custom_components/pyscript/eval.py", line 800, in call
val = await self.try_aeval(ast_ctx, arg1)
File "/config/custom_components/pyscript/eval.py", line 700, in try_aeval
return await ast_ctx.aeval(arg)
File "/config/custom_components/pyscript/eval.py", line 940, in aeval
val = await getattr(self, name, self.ast_not_implemented)(arg)
File "/config/custom_components/pyscript/eval.py", line 1224, in ast_try
val = await self.aeval(arg1)
File "/config/custom_components/pyscript/eval.py", line 940, in aeval
val = await getattr(self, name, self.ast_not_implemented)(arg)
File "/config/custom_components/pyscript/eval.py", line 1468, in ast_assign
rhs = await self.aeval(arg.value)
File "/config/custom_components/pyscript/eval.py", line 940, in aeval
val = await getattr(self, name, self.ast_not_implemented)(arg)
File "/config/custom_components/pyscript/eval.py", line 1937, in ast_call
return await self.call_func(func, func_name, *args, **kwargs)
File "/config/custom_components/pyscript/eval.py", line 1982, in call_func
return func(*args, **kwargs)
The text was updated successfully, but these errors were encountered:
Updated title. Duplicate of #687: pytz uses lazy loading, so you should use zoneinfo instead.
craigbarratt
changed the title
error
Detected blocking call to open with args ('/usr/local/lib/python3.13/site-packages/pytz/zoneinfo/Africa/Abidjan', 'rb')
Mar 6, 2025
2025-03-06 16:39:41.825 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.13/site-packages/pytz/zoneinfo/Africa/Abidjan', 'rb') inside the event loop by custom integration 'pyscript' at custom_components/pyscript/eval.py, line 1982: return func(*args, **kwargs) (offender: /usr/local/lib/python3.13/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/custom-components/pyscript/issues
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 227, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 213, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
self._run_once()
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
handle._run()
File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
self._context.run(self._callback, *self._args)
File "/config/custom_components/pyscript/function.py", line 448, in run_coro
result = await coro
File "/config/custom_components/pyscript/trigger.py", line 1380, in do_func_call
await ast_ctx.call_func(func, None, **kwargs)
File "/config/custom_components/pyscript/eval.py", line 1952, in call_func
return await func.call(self, *args, **kwargs)
File "/config/custom_components/pyscript/eval.py", line 800, in call
val = await self.try_aeval(ast_ctx, arg1)
File "/config/custom_components/pyscript/eval.py", line 700, in try_aeval
return await ast_ctx.aeval(arg)
File "/config/custom_components/pyscript/eval.py", line 940, in aeval
val = await getattr(self, name, self.ast_not_implemented)(arg)
File "/config/custom_components/pyscript/eval.py", line 1224, in ast_try
val = await self.aeval(arg1)
File "/config/custom_components/pyscript/eval.py", line 940, in aeval
val = await getattr(self, name, self.ast_not_implemented)(arg)
File "/config/custom_components/pyscript/eval.py", line 1468, in ast_assign
rhs = await self.aeval(arg.value)
File "/config/custom_components/pyscript/eval.py", line 940, in aeval
val = await getattr(self, name, self.ast_not_implemented)(arg)
File "/config/custom_components/pyscript/eval.py", line 1937, in ast_call
return await self.call_func(func, func_name, *args, **kwargs)
File "/config/custom_components/pyscript/eval.py", line 1982, in call_func
return func(*args, **kwargs)
The text was updated successfully, but these errors were encountered: