Skip to content

Detected blocking call to scandir #746

@Sythsaz

Description

@Sythsaz

I'm pretty sure I don't have any scripts looking is this directory but I got this error overnight. Thanks

Source: util/loop.py:137
First occurred: 1:00:01 AM (1 occurrence)
Last logged: 1:00:01 AM

Detected blocking call to scandir with args ('/share/downloads',) inside the event loop by custom integration 'pyscript' at custom_components/pyscript/eval.py, line 1983: return func(*args, **kwargs) (offender: /usr/local/lib/python3.13/pathlib/_local.py, line 575: with os.scandir(root_dir) as scandir_it:), 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/#scandir 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 156, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 706, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 677, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2034, 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/eval.py", line 509, in do_service_call retval = await func.call(ast_ctx, **data) File "/config/custom_components/pyscript/eval.py", line 801, in call val = await self.try_aeval(ast_ctx, arg1) File "/config/custom_components/pyscript/eval.py", line 701, in try_aeval return await ast_ctx.aeval(arg) File "/config/custom_components/pyscript/eval.py", line 941, in aeval val = await getattr(self, name, self.ast_not_implemented)(arg) File "/config/custom_components/pyscript/eval.py", line 1030, in ast_if val = await self.aeval(arg1) File "/config/custom_components/pyscript/eval.py", line 941, in aeval val = await getattr(self, name, self.ast_not_implemented)(arg) File "/config/custom_components/pyscript/eval.py", line 1225, in ast_try val = await self.aeval(arg1) File "/config/custom_components/pyscript/eval.py", line 941, in aeval val = await getattr(self, name, self.ast_not_implemented)(arg) File "/config/custom_components/pyscript/eval.py", line 1469, in ast_assign rhs = await self.aeval(arg.value) File "/config/custom_components/pyscript/eval.py", line 941, in aeval val = await getattr(self, name, self.ast_not_implemented)(arg) File "/config/custom_components/pyscript/eval.py", line 1819, in ast_listcomp result = await self.listcomp_loop(arg.generators, arg.elt) File "/config/custom_components/pyscript/eval.py", line 1804, in listcomp_loop for loop_var in await self.aeval(gen.iter): File "/config/custom_components/pyscript/eval.py", line 941, in aeval val = await getattr(self, name, self.ast_not_implemented)(arg) File "/config/custom_components/pyscript/eval.py", line 1938, in ast_call return await self.call_func(func, func_name, *args, **kwargs) File "/config/custom_components/pyscript/eval.py", line 1983, in call_func return func(*args, **kwargs)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions