Skip to content

Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/ttastromech/sounds/a.wav', 'rb') #6

@zolakt

Description

@zolakt

System Health details

System Information

version core-2024.11.2
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.31-haos-raspi
arch aarch64
timezone Europe/Belgrade
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 4988
Installed Version 2.0.1
Stage running
Available Repositories 1463
Downloaded Repositories 23
Home Assistant Cloud
logged_in true
subscription_expiration August 18, 2025 at 02:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled false
cloud_ice_servers_enabled true
remote_server eu-central-1-1.ui.nabu.casa
certificate_status ready
instance_id 27bec0ccfa80452883e99199cc41a174
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 13.2
update_channel stable
supervisor_version supervisor-2024.11.4
agent_version 1.6.0
docker_version 27.2.0
disk_total 57.8 GB
disk_used 23.2 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board rpi4-64
supervisor_api ok
version_api ok
installed_addons File editor (5.8.0), Node-RED (18.1.1), Advanced SSH & Web Terminal (19.0.0), Samba share (12.3.2), Let's Encrypt (5.2.3), Studio Code Server (5.17.3), Mosquitto broker (6.4.1), openWakeWord (1.10.0), porcupine1 (1.2.0), ESPHome Device Compiler (2024.11.1), Matter Server (6.6.0)
Dashboards
dashboards 7
resources 10
views 11
mode storage
Recorder
oldest_recorder_run November 14, 2024 at 08:29
current_recorder_run November 22, 2024 at 13:37
estimated_db_size 404.10 MiB
database_engine sqlite
database_version 3.45.3

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

I've started to see these warnings in logs recently:

Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/ttastromech/sounds/a.wav', 'rb') inside the event loop by custom integration 'astromech' at custom_components/astromech/tts.py, line 68: self._r2 = TTAstromech() (offender: /usr/local/lib/python3.12/wave.py, line 282: f = builtins.open(f, 'rb')), please create a bug report at https://github.com/vigonotion/tts.astromech/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/config_entries.py", line 783, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 546, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/astromech/__init__.py", line 21, in async_setup_entry await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2255, in async_forward_entry_setups await self._async_forward_entry_setups_locked(entry, platforms) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2266, in _async_forward_entry_setups_locked await asyncio.gather( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2268, in <genexpr> 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/config_entries.py", line 2348, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 546, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 369, in async_setup_entry return await hass.data[DATA_COMPONENT].async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 197, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 332, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.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 "/config/custom_components/astromech/tts.py", line 58, in async_setup_entry TextToAstromech(), File "/config/custom_components/astromech/tts.py", line 68, in __init__ self._r2 = TTAstromech()

Any idea how to get rid of these?

Reproduction steps

  1. Start HA
  2. Check logs in System->Logs

Debug logs

not required

Diagnostics dump

not required

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions