I hope there is some simple issue but I cannot find reason for days.
I set VSC with HA container according to documentation. I am able to run HA using predefined Tasks - Terminal - Run Tasks - ‘Run Home Assistant Core’. Then Im able to configure HA via localhost:8123. All seems ok. But When I attempt to run a debug I got a bunch of errors in ‘selectors.py’ module of Python.
Can you please advice what is wrong with my setup?
You might want to install all the requirements in your devcontainer to avoid this.
I did install those from Tasks, i took a while but I believe it has installed packages to the right place. Below the log after debug run. the first error occures with
File "/workspaces/core/homeassistant/util/async_.py", line 118, in check_loop
raise RuntimeError(
RuntimeError: Detected blocking call inside the event loop. This is causing stability issues. Please report issue
This is a place in async_.py when it scans components
for path in ("custom_components/", "homeassistant/components/"):
try:
index = frame.filename.index(path)
found_frame = frame
Can there be a problem with permitions to some folders?
DEBUG LOG:
root ➜ /workspaces/core (dev) $ cd /workspaces/core ; /usr/bin/env /usr/local/bin/python /root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/launcher 40665 -- -m homeassistant --debug -c config
Traceback (most recent call last):
File "_pydevd_bundle/pydevd_cython.pyx", line 1078, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 297, in _pydevd_bundle.pydevd_cython.PyDBFrame.do_wait_suspend
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1976, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2011, in _do_wait_suspend
time.sleep(0.01)
File "/workspaces/core/homeassistant/util/async_.py", line 155, in protected_loop_func
check_loop(strict=strict)
File "/workspaces/core/homeassistant/util/async_.py", line 118, in check_loop
raise RuntimeError(
RuntimeError: Detected blocking call inside the event loop. This is causing stability issues. Please report issue
Traceback (most recent call last):
File "_pydevd_bundle/pydevd_cython.pyx", line 1078, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 297, in _pydevd_bundle.pydevd_cython.PyDBFrame.do_wait_suspend
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1976, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2011, in _do_wait_suspend
time.sleep(0.01)
File "/workspaces/core/homeassistant/util/async_.py", line 156, in protected_loop_func
return func(*args, **kwargs)
SystemExit
Traceback (most recent call last):
File "_pydevd_bundle/pydevd_cython.pyx", line 1078, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 297, in _pydevd_bundle.pydevd_cython.PyDBFrame.do_wait_suspend
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1976, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2011, in _do_wait_suspend
time.sleep(0.01)
File "/workspaces/core/homeassistant/util/async_.py", line 156, in protected_loop_func
return func(*args, **kwargs)
SystemExit
Traceback (most recent call last):
File "_pydevd_bundle/pydevd_cython.pyx", line 1078, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 297, in _pydevd_bundle.pydevd_cython.PyDBFrame.do_wait_suspend
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1976, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2011, in _do_wait_suspend
time.sleep(0.01)
File "/workspaces/core/homeassistant/util/async_.py", line 156, in protected_loop_func
return func(*args, **kwargs)
SystemExit
2022-01-20 11:26:11 WARNING (Thread-8) [homeassistant.util.executor] Thread[SyncWorker_0] is still running at shutdown: File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py", line 1054, in __call__
ret = self.original_func(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/threading.py", line 930, in _bootstrap
self._bootstrap_inner()
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 82, in _worker
if work_item is not None:
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1976, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2011, in _do_wait_suspend
time.sleep(0.01)
File "/workspaces/core/homeassistant/util/async_.py", line 156, in protected_loop_func
return func(*args, **kwargs)
2022-01-20 11:26:12 WARNING (Thread-8) [homeassistant.util.executor] Thread[SyncWorker_0] is still running at shutdown: File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py", line 1054, in __call__
ret = self.original_func(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/threading.py", line 930, in _bootstrap
self._bootstrap_inner()
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 83, in _worker
work_item.run()
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 53, in run
def run(self):
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1976, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2011, in _do_wait_suspend
time.sleep(0.01)
File "/workspaces/core/homeassistant/util/async_.py", line 156, in protected_loop_func
return func(*args, **kwargs)
2022-01-20 11:26:13 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
cli.main()
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
run()
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 331, in run_module
run_module_as_main(target_as_str, alter_argv=True)
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/workspaces/core/homeassistant/__main__.py", line 319, in <module>
sys.exit(main())
File "/workspaces/core/homeassistant/__main__.py", line 306, in main
exit_code = runner.run(runtime_conf)
File "/workspaces/core/homeassistant/runner.py", line 119, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/workspaces/core/homeassistant/runner.py", line 101, in setup_and_run_hass
hass = await bootstrap.async_setup_hass(runtime_config)
File "/workspaces/core/homeassistant/bootstrap.py", line 131, in async_setup_hass
await async_from_config_dict(config_dict, hass) is not None
File "/workspaces/core/homeassistant/bootstrap.py", line 215, in async_from_config_dict
await asyncio.gather(
File "/workspaces/core/homeassistant/setup.py", line 78, in async_setup_component
return await task
File "/workspaces/core/homeassistant/setup.py", line 156, in _async_setup_component
integration = await loader.async_get_integration(hass, domain)
File "/workspaces/core/homeassistant/loader.py", line 588, in async_get_integration
integration = await _async_get_integration(hass, domain)
File "/workspaces/core/homeassistant/loader.py", line 606, in _async_get_integration
if integration := (await async_get_custom_components(hass)).get(domain):
File "/workspaces/core/homeassistant/loader.py", line 151, in async_get_custom_components
evt = hass.data[DATA_CUSTOM_COMPONENTS] = asyncio.Event()
File "/workspaces/core/homeassistant/loader.py", line 151, in async_get_custom_components
evt = hass.data[DATA_CUSTOM_COMPONENTS] = asyncio.Event()
File "_pydevd_bundle/pydevd_cython.pyx", line 1363, in _pydevd_bundle.pydevd_cython.SafeCallWrapper.__call__
File "_pydevd_bundle/pydevd_cython.pyx", line 662, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 1087, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 1078, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 297, in _pydevd_bundle.pydevd_cython.PyDBFrame.do_wait_suspend
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 1976, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "/root/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 2011, in _do_wait_suspend
time.sleep(0.01)
File "/workspaces/core/homeassistant/util/async_.py", line 155, in protected_loop_func
check_loop(strict=strict)
File "/workspaces/core/homeassistant/util/async_.py", line 118, in check_loop
raise RuntimeError(
RuntimeError: Detected blocking call inside the event loop. This is causing stability issues. Please report issue
Removed Container
Removed VSC
Removed Docker
Refreshed forked /core on github
rebooted
Install all those again
Installed requirements_all.txt
user is in docker group
… absolutely same error …
Amazing… I created a new test user to my ubuntu, added it to docker group, ran installation and I am able to run the debugger without any errors!
How do I revert the installation when I press OPEN button on the step 2 from the official page ?