I updated the latest code of the dev branch, and it cannot be started in debug mode, but it can be started in non-debug mode. The commands displayed in the pycharm console are:
debug mode command: /Users/xxx/workspace/ha/core/venv/bin/python -X pycache_prefix=/Users/xxx/Library/Caches/JetBrains/PyCharm2024.1/cpython-cache /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --module --multiprocess --qt-support=auto --client 127.0.0.1 --port 60907 --file homeassistant.main
non-debug mode command: /Users/xxx/workspace/ha/core/venv/bin/python -m homeassistant.main
the error message is :
/Users/xxx/workspace/ha/core/venv/bin/python -X pycache_prefix=/Users/xxx/Library/Caches/JetBrains/PyCharm2024.1/cpython-cache /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --module --multiprocess --qt-support=auto --client 127.0.0.1 --port 60907 --file homeassistant.__main__
Connected to pydev debugger (build 241.17890.14)
Exception ignored in: <function Task.__del__ at 0x102d53f60>
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 150, in __del__
self._loop.call_exception_handler(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'call_exception_handler'
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1563, in _exec
runpy._run_module_as_main(module_name, alter_argv=False)
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/xxx/workspace/ha/core/homeassistant/__main__.py", line 223, in <module>
sys.exit(main())
^^^^^^
File "/Users/xxx/workspace/ha/core/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/workspace/ha/core/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/PyCharm.app/Contents/plugins/python/helpers-pro/pydevd_asyncio/pydevd_nest_asyncio.py", line 243, in run_until_complete
return f.result()
^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/Users/xxx/workspace/ha/core/homeassistant/runner.py", line 158, in setup_and_run_hass
hass = await bootstrap.async_setup_hass(runtime_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/workspace/ha/core/homeassistant/bootstrap.py", line 307, in async_setup_hass
await async_from_config_dict(config_dict, hass) is not None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/workspace/ha/core/homeassistant/bootstrap.py", line 434, in async_from_config_dict
await async_load_base_functionality(hass)
File "/Users/xxx/workspace/ha/core/homeassistant/bootstrap.py", line 404, in async_load_base_functionality
create_eager_task(get_internal_store_manager(hass).async_initialize()),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/workspace/ha/core/homeassistant/util/async_.py", line 37, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: _patch_task.<locals>.task_new_init() got an unexpected keyword argument 'eager_start'
sys:1: RuntimeWarning: coroutine '_StoreManager.async_initialize' was never awaited
Process finished with exit code 1
There is another question. I step into the code and found that the code here called the del method. Why not the init method?
Please help me, thanks!