Closed Takst3in closed 2 months ago
Crash log from v2.0.16-dev2 here;
2024-03-20 22:11:22.436 WARNING (MainThread) [homeassistant.runner] Task could not be canceled and was still running after shutdown: <Task cancelling name='Task-6294' coro=<WebSocketCommonProtocol.close_connection() running at /usr/local/lib/python3.12/site-packages/websockets/legacy/protocol.py:1311> wait_for=<Future pending cb=[shield.
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running 2024-03-20 22:11:22.451 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object AsyncClientSession.subscribe at 0x7f077a3ce640> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/runner.py", line 188, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1961, in _run_once handle = heapq.heappop(self._scheduled) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running 2024-03-20 22:11:22.455 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object AsyncClientSession._subscribe at 0x7f078527cb80> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/runner.py", line 188, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1961, in _run_once handle = heapq.heappop(self._scheduled) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running 2024-03-20 22:11:22.495 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_15] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.518 CRITICAL (SyncWorker_15) [concurrent.futures] Exception in worker Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 82, in _worker work_item = work_queue.get_nowait() ^^^^^^^^^^^^^^^^^^^^^^^ _queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SystemExit 2024-03-20 22:11:22.534 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_60] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.552 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_24] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.593 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_61] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker work_item.run() File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/speedtestdotnet/coordinator.py", line 70, in update_data self.api.download() File "/usr/local/lib/python3.12/site-packages/speedtest.py", line 1569, in download prod_thread.join(timeout=0.001) File "/usr/local/lib/python3.12/threading.py", line 1151, in join self._wait_for_tstate_lock(timeout=max(timeout, 0)) File "/usr/local/lib/python3.12/threading.py", line 1167, in _wait_for_tstate_lock if lock.acquire(block, timeout): 2024-03-20 22:11:22.596 CRITICAL (SyncWorker_60) [concurrent.futures] Exception in worker Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 82, in _worker work_item = work_queue.get_nowait() ^^^^^^^^^^^^^^^^^^^^^^^ _queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SystemExit 2024-03-20 22:11:22.610 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_55] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.616 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_24] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.636 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_61] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.653 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_55] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.694 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_13] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker work_item.run() File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 1814, in getMost results = self.performRequest(requestData) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 575, in performRequest res = self.request( File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 163, in request response = session.request(method, url, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn conn.connect() File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.12/ssl.py", line 1042, in _create self.do_handshake() File "/usr/local/lib/python3.12/ssl.py", line 1320, in do_handshake self._sslobj.do_handshake() 2024-03-20 22:11:22.696 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_13] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker work_item.run() File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 1814, in getMost results = self.performRequest(requestData) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 575, in performRequest res = self.request( File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 163, in request response = session.request(method, url, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn conn.connect() File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.12/ssl.py", line 1042, in _create self.do_handshake() File "/usr/local/lib/python3.12/ssl.py", line 1320, in do_handshake self._sslobj.do_handshake() 2024-03-20 22:11:22.861 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_24] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:22.946 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_24] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:23.025 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_61] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:23.189 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_55] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:23.194 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_61] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:23.353 WARNING (Thread-138 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_13] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker work_item.run() File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 1814, in getMost results = self.performRequest(requestData) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 575, in performRequest res = self.request( File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 163, in request response = session.request(method, url, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn conn.connect() File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.12/ssl.py", line 1042, in _create self.do_handshake() File "/usr/local/lib/python3.12/ssl.py", line 1320, in do_handshake self._sslobj.do_handshake() 2024-03-20 22:11:23.444 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_55] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) 2024-03-20 22:11:23.693 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_13] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker work_item.run() File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 1814, in getMost results = self.performRequest(requestData) File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 575, in performRequest res = self.request( File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 163, in request response = session.request(method, url, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn conn.connect() File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.12/ssl.py", line 1042, in _create self.do_handshake() File "/usr/local/lib/python3.12/ssl.py", line 1320, in do_handshake self._sslobj.do_handshake() 2024-03-20 22:11:25.478 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:25.479 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:25.479 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:25.490 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:25.491 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:25.491 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:26.953 ERROR (Thread-7 (_thread_main)) [paho.mqtt.client] Caught exception in on_message: Event loop is closed 2024-03-20 22:11:26.955 ERROR (Thread-7 (_thread_main)) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/usr/local/lib/python3.12/threading.py", line 1010, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 807, in _mqtt_on_message self.loop.call_soon_threadsafe(self._mqtt_handle_message, msg) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 838, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 540, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed 2024-03-20 22:11:27.494 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:27.494 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:27.494 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:28.496 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:28.496 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:28.497 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:29.499 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:29.499 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:29.500 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:30.501 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:30.502 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:30.502 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:32.506 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:32.506 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:32.506 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:32.599 CRITICAL (SyncWorker_24) [concurrent.futures] Exception in worker Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 82, in _worker work_item = work_queue.get_nowait() ^^^^^^^^^^^^^^^^^^^^^^^ _queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SystemExit 2024-03-20 22:11:32.602 CRITICAL (SyncWorker_61) [concurrent.futures] Exception in worker Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 82, in _worker work_item = work_queue.get_nowait() ^^^^^^^^^^^^^^^^^^^^^^^ _queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SystemExit 2024-03-20 22:11:32.605 CRITICAL (SyncWorker_55) [concurrent.futures] Exception in worker Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 82, in _worker work_item = work_queue.get_nowait() ^^^^^^^^^^^^^^^^^^^^^^^ _queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker work_item = work_queue.get(block=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SystemExit 2024-03-20 22:11:33.135 ERROR (Thread-112 (mqtt_listen_thread)) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:33.135 ERROR (Thread-112 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:33.135 ERROR (Thread-112 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:33.508 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:33.509 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:33.509 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:34.510 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:34.510 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:34.511 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:35.157 ERROR (Thread-112 (mqtt_listen_thread)) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:35.158 ERROR (Thread-112 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:35.158 ERROR (Thread-112 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:36.515 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:36.515 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:36.516 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:37.517 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:37.517 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:37.517 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:38.518 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:38.519 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:38.519 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:40.521 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:40.522 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:40.522 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-20 22:11:41.523 ERROR (Thread-114) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-20 22:11:41.524 ERROR (Thread-114) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-20 22:11:41.524 ERROR (Thread-114) [custom_components.bambu_lab] Exception data: Event loop is closed
I am also seeing this. Same pattern of exceptions of these three lines:
2024-03-21 21:54:14.975 ERROR (Thread-89223) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data():
2024-03-21 21:54:14.976 ERROR (Thread-89223) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'>
2024-03-21 21:54:14.976 ERROR (Thread-89223) [custom_components.bambu_lab] Exception data: Event loop is closed
2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data():
2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'>
2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception data: Event loop is closed
However, I don't know if these exceptions are a symptom of a crash elsewhere or the cause.
Yea, I've had to disable tis for the time being because of the stability issues
I have too. I'm not sure why, but my HA is not restarting after crashing. Supervisor is not doing its duty it seems, and I have to SSH into the box and run ha core start
regularly. So far, with Bambu disabled it hasn't crashed, but I only did it about an hour ago so I'm sitting tight to see. There is an exception I see in logs before Bambu coming from my Shelly integration that could be the root culprit, but if others are finding this with Bambu Labs integration, that is feeling more likely.
I have too. I'm not sure why, but my HA is not restarting after crashing. Supervisor is not doing its duty it seems, and I have to SSH into the box and run
ha core start
regularly. So far, with Bambu disabled it hasn't crashed, but I only did it about an hour ago so I'm sitting tight to see. There is an exception I see in logs before Bambu coming from my Shelly integration that could be the root culprit, but if others are finding this with Bambu Labs integration, that is feeling more likely.
This is correct, I also often needs to do an "core start" after the crash.
I am also seeing this. Same pattern of exceptions of these three lines:
2024-03-21 21:54:14.975 ERROR (Thread-89223) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-21 21:54:14.976 ERROR (Thread-89223) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-21 21:54:14.976 ERROR (Thread-89223) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception data: Event loop is closed
However, I don't know if these exceptions are a symptom of a crash elsewhere or the cause.
They are a symptom. Once the HA main thread gets into the bad state every time the bambu integration tells it we have new data we get an exception back.
For those hitting this, I need full debug logs to try and work out what the trigger is for this. I am not hitting it myself. I'll see if updating my HA version gets me the repro.
True as that may be, I haven't had a crash since disabling the integration.
I need full debug logs (not just debug for the integration) from someone that can readily reproduce it to see if i can work out what the initial trigger is.
I need full debug logs (not just debug for the integration) from someone that can readily reproduce it to see if i can work out what the initial trigger is.
I can reliable reproduce, but I'm at easter vacation right now, and I dont want to mess with the stability now when I'm not home (got it disabled atm). I can supply you these in 3-4 days if not anyone else beats me to it before then.
Thanks!
@Takst3in will you be able to get me some comprehensive (full HA) debug logs? So far with just debug logs for this integration I haven't been able to identify how the integration is causing this problem. And I have never hit this myself.
@Takst3in will you be able to get me some comprehensive (full HA) debug logs? So far with just debug logs for this integration I haven't been able to identify how the integration is causing this problem. And I have never hit this myself.
Managed to send you the logs direcly in a Message in the Home Assistant Community, since I were unsure about the sensitivity of these files.
I am also seeing this. Same pattern of exceptions of these three lines:
2024-03-21 21:54:14.975 ERROR (Thread-89223) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-21 21:54:14.976 ERROR (Thread-89223) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-21 21:54:14.976 ERROR (Thread-89223) [custom_components.bambu_lab] Exception data: Event loop is closed 2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] An exception occurred calling async_set_updated_data(): 2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception type: <class 'RuntimeError'> 2024-03-21 21:54:15.205 ERROR (Thread-4 (mqtt_listen_thread)) [custom_components.bambu_lab] Exception data: Event loop is closed
However, I don't know if these exceptions are a symptom of a crash elsewhere or the cause.
I have the same experience with this add-on enabled. I have disabled it for now, but can enable it and try to grab more logs if needed.
I have a P1P (upgrade to P1S). I have been running this plug in since late Dec, and I didn't have any issues for quite a while.
Do you know what changed? Did you upgrade HA, upgrade the plugin? If either of those do you know what both the old and new versions were?
I don't have good details for you. It started back in Feb/early March, and I try to keep both HA and the addons up to date. I disabled several other addons to isolate, and this was the one that seemed to give me stability. I finally got some time to look into it, and realized other people were seeing something similar.
I don't have good details for you. It started back in Feb/early March, and I try to keep both HA and the addons up to date. I disabled several other addons to isolate, and this was the one that seemed to give me stability. I finally got some time to look into it, and realized other people were seeing something similar.
Exactly the same situation for me .... once I disabled this my stability returned to normal... as a test I re-enabled this and it crashed within an hour
Same for me but only when the printer prints. Do you need additional logs?
Please try this version: https://github.com/greghesp/ha-bambulab/releases/tag/v2.0.16-dev4
@Takst3in since you had the quickest / most consistent repro I'd appreciate if you could give this version a go. It fixes a threading issue that has a high chance of being the root cause of your issues.
@Takst3in since you had the quickest / most consistent repro I'd appreciate if you could give this version a go. It fixes a threading issue that has a high chance of being the root cause of your issues.
Installed 👍
I'll let it run overnight without debug first, then I'll try some debugging with ongoing prints in about 18hours time.
Still going strong, 7 hours in.. Also worth mentioning that my setup have been ported over to Proxmox this weekend, but if it stable, its stable.. I'll let it run till after work before stress testing(if active printing actually have something to say in this..)
I'm keeping my fingers crossed the threading issue was the majority of entirety of the recent instability. It's a little surprising that HA running in docker seemed to continue to be rock solid though.
It had 21h without any issue, before I had to take down the host for some bios modifications, after this, its stable for additional 9h.
It seems OK 👌 push it.. 🤞
Great & wonderful assistance on this annoying issue 💯
I'm keeping my fingers crossed the threading issue was the majority of entirety of the recent instability. It's a little surprising that HA running in docker seemed to continue to be rock solid though.
Not for my docker setup tho
Closing this as resolved. Please open a new issue (with debug logs) if you still hit any further instability to help me keep repros prior to this fix vs after.
Not for my docker setup tho I'd love to know why I never saw any instability. I hate bugs I never see.
@AdrianGarside is this fix included in 2.0.18?
(stable as f&$# now!) 😊
Yes
I’m stable now too. Thank you very much for fixing this.
Yes
Do you have a link to buy you a coffee or beer?
Yes :). https://ko-fi.com/adriangarside
Describe the bug
When the integration is enabled, my HA crashed/reboots approc atleast once every hour.
Integration set up via cloud, and local-IP. The lines in debug-log/Home Assistant log that contains information in relation to the integration is provided, I hope this points you to fint the root cause of this.
The printer is only a couple of days old, and this behaviour of the integration crashing, have been like this since day one.
To Reproduce
Expected Behaviour
Stable
What device are you using?
P1S
Diagnostic Output
Log Extracts
Other Information
No response