Skip to content

Detected blocking call to scandir with args (b'/config/pyscript',)  #616

Closed
@psykokwak-com

Description

@psykokwak-com

Since last HA update, I have the following error in loop :

2024-07-08 11:06:49.641 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir with args (b'/config/pyscript',) inside the event loop by custom integration 'pyscript' at custom_components/pyscript/init.py, line 335: observer.start() (offender: , line 366: ?), 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 "", 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/src/homeassistant/homeassistant/runner.py", line 166, in setup_and_run_hass
return await hass.async_run()
File "/usr/src/homeassistant/homeassistant/core.py", line 523, in async_run
await self.async_start()
File "/usr/src/homeassistant/homeassistant/core.py", line 576, in async_start
self.bus.async_fire_internal(EVENT_HOMEASSISTANT_STARTED)
File "/usr/src/homeassistant/homeassistant/core.py", line 1559, in async_fire_internal
self._hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 941, in async_run_hass_job
return self._async_add_hass_job(hassjob, *args, background=background)
File "/usr/src/homeassistant/homeassistant/core.py", line 756, in async_add_hass_job
task = create_eager_task(
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 37, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File "/config/custom_components/pyscript/init.py", line 335, in hass_started
observer.start()

My HA informations :

System Information

version core-2024.7.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.33-haos
arch x86_64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4785
Installed Version 1.34.0
Stage running
Available Repositories 1394
Downloaded Repositories 10
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.4
update_channel stable
supervisor_version supervisor-2024.06.2
agent_version 1.6.0
docker_version 26.1.4
disk_total 503.3 GB
disk_used 169.2 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Terminal & SSH (9.14.0), File editor (5.8.0), Samba share (12.3.1), Studio Code Server (5.15.0), SQLite Web (4.1.2)
Dashboards
dashboards 2
resources 7
views 9
mode storage
Recorder
oldest_recorder_run 8 juillet 2024 à 09:06
current_recorder_run 8 juillet 2024 à 11:06
estimated_db_size 3.54 MiB
database_engine sqlite
database_version 3.45.3
Xiaomi Miot Auto
component_version 0.7.18
can_reach_server ok
can_reach_spec ok
logged_accounts 1
total_devices 4

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