diff --git a/archinstall/tui/ui/components.py b/archinstall/tui/ui/components.py index ced6b5a9..475f7b17 100644 --- a/archinstall/tui/ui/components.py +++ b/archinstall/tui/ui/components.py @@ -113,7 +113,9 @@ class LoadingScreen(BaseScreen[ValueT]): 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()