8000 check_config script fails because of asyncio.get_event_loop() · Issue #134674 · home-assistant/core · GitHub
[go: up one dir, main page]

Skip to content
check_config script fails because of asyncio.get_event_loop() #134674
@andreby

Description

@andreby

The problem

I'm running ha container; I've tried both latest stable and latest dev images, as of today.

According to the docs I should be able to run the following command to check the configuration syntax:

    docker exec homeassistant python -m homeassistant --script check_config --config /config

However, that results in:

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 227, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 183, in main
    return scripts.run(args.script)
           ~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/scripts/__init__.py", line 49, in run
    loop = asyncio.get_event_loop()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 716, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Dummy-1'.
Exception ignored in: <function _DeleteDummyThreadOnDel.__del__ at 0xf7616118>
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/threading.py", line 1383, in __del__
TypeError: 'NoneType' object does not support the context manager protocol

I see that the docs for asyncio.get_event_loop() says that its behaviour has changed starting with python-3.13 which is the version of python currently used by ha.

What version of Home Assistant Core has the issue?

core-2025.1.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0