From 104244e2a856f971dbeb5faeed8eaef22c7dd974 Mon Sep 17 00:00:00 2001 From: PaulJonasJost Date: Mon, 24 Nov 2025 22:00:06 +0100 Subject: [PATCH] Updated first start issue --- src/petab_gui/app.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/petab_gui/app.py b/src/petab_gui/app.py index 15340ee..f6dc148 100644 --- a/src/petab_gui/app.py +++ b/src/petab_gui/app.py @@ -135,11 +135,17 @@ def main(): args = parser.parse_args() if sys.platform == "darwin": - from Foundation import NSBundle # type: type: ignore[import] - - bundle = NSBundle.mainBundle() - info = bundle.localizedInfoDictionary() or bundle.infoDictionary() - info["CFBundleName"] = APP_NAME + try: + from Foundation import NSBundle # type: ignore[import] + + bundle = NSBundle.mainBundle() + info = bundle.localizedInfoDictionary() or bundle.infoDictionary() + info["CFBundleName"] = APP_NAME + except ModuleNotFoundError: + # If Foundation is still not found, the app will run without + # setting the bundle name (non-critical macOS-specific feature) + # Problem resolves after reactivating the virtual environment. + pass app = PEtabGuiApp(args.petab_yaml) sys.exit(app.exec())