From bdb4f66a069b519ab21ff7bc96b9cffa549ebc60 Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Thu, 26 Mar 2026 20:51:45 +1100 Subject: [PATCH] Fix AwaitComplete runtime error --- archinstall/tui/ui/components.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archinstall/tui/ui/components.py b/archinstall/tui/ui/components.py index 6c78b7547c..89059e6086 100644 --- a/archinstall/tui/ui/components.py +++ b/archinstall/tui/ui/components.py @@ -113,7 +113,9 @@ def _set_cursor(self) -> None: def _exec_callback(self) -> None: assert self._data_callback result = self._data_callback() - _ = self.dismiss(Result(ResultType.Selection, _data=result)) + # cannot call self.dismiss directly from + # background thread (thread=true) as there's no event loop + self.app.call_from_thread(self.dismiss, Result(ResultType.Selection, _data=result)) def action_pop_screen(self) -> None: _ = self.dismiss()