I’ve set up HA Core in docker using the latest homeassistant/home-assistant official image (version 2024.12.0) and have added ‘debugpy:’ to configuration.yaml. The container runs in host mode and everything is working well except debugpy doesn’t start. In the log I get:
Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:526
First occurred: 1:01:05 PM (1 occurrences)
Last logged: 1:01:05 PM
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: '<' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py", line 455, in _get_code_line_info
return _cache[code_obj]
~~~~~~^^^^^^^^^^
KeyError: <code object _worker at 0x724f5cb0ed00, file "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 69>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1110, in _async_admin_handler
await result
File "/usr/src/homeassistant/homeassistant/components/debugpy/__init__.py", line 50, in debug_start
await hass.async_add_executor_job(
debugpy.listen, (conf[CONF_HOST], conf[CONF_PORT])
)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/debugpy/public_api.py", line 31, in wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.13/site-packages/debugpy/server/api.py", line 143, in debug
log.reraise_exception("{0}() failed:", func.__name__, level="info")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/debugpy/server/api.py", line 141, in debug
return func(address, settrace_kwargs, **kwargs)
File "/usr/local/lib/python3.13/site-packages/debugpy/server/api.py", line 282, in listen
_settrace(
~~~~~~~~~^
host=server_host,
^^^^^^^^^^^^^^^^^
...<4 lines>...
**settrace_kwargs
^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/debugpy/server/api.py", line 45, in _settrace
return pydevd.settrace(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 3025, in settrace
_locked_settrace(
~~~~~~~~~~~~~~~~^
host,
^^^^^
...<14 lines>...
notify_stdin=notify_stdin,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 3152, in _locked_settrace
py_db.set_tracing_for_untraced_contexts()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 1226, in set_tracing_for_untraced_contexts
self.set_trace_for_frame_and_parents(thread_ident, frame)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 2418, in set_trace_for_frame_and_parents
pydevd_sys_monitoring.enable_code_tracing(thread_ident, frame.f_code, frame)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py", line 701, in enable_code_tracing
func_code_info: FuncCodeInfo = _get_func_code_info(code, frame)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py", line 525, in _get_func_code_info
code_line_info = _get_code_line_info(code_obj)
File "/usr/local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py", line 465, in _get_code_line_info
first_line = min(line_to_offset)
TypeError: '<' not supported between instances of 'NoneType' and 'int'
I have absolutely no idea on how to go about this. Can anybody help?