File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -135,11 +135,17 @@ def main():
135135 args = parser .parse_args ()
136136
137137 if sys .platform == "darwin" :
138- from Foundation import NSBundle # type: type: ignore[import]
139-
140- bundle = NSBundle .mainBundle ()
141- info = bundle .localizedInfoDictionary () or bundle .infoDictionary ()
142- info ["CFBundleName" ] = APP_NAME
138+ try :
139+ from Foundation import NSBundle # type: ignore[import]
140+
141+ bundle = NSBundle .mainBundle ()
142+ info = bundle .localizedInfoDictionary () or bundle .infoDictionary ()
143+ info ["CFBundleName" ] = APP_NAME
144+ except ModuleNotFoundError :
145+ # If Foundation is still not found, the app will run without
146+ # setting the bundle name (non-critical macOS-specific feature)
147+ # Problem resolves after reactivating the virtual environment.
148+ pass
143149
144150 app = PEtabGuiApp (args .petab_yaml )
145151 sys .exit (app .exec ())
You can’t perform that action at this time.
0 commit comments