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()