Bug #8845
closedError in exception handling stops OSX version to start if there is an error with loading the GTK libs.
100%
Description
For some reason CHIRP daily build was not able to load the GTK libraries as a result macapp is not initialised, causing a bug in chirp/chirp/ui/mainapp.py:
Uwes-MacBook-Pro-5340:MacOS uwe$ ./chirp 2021-02-28 18:53:21.045 CHIRP[10254:39824] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. WARNING: Icon not found test Traceback (most recent call last): File "./../Resources/chirp/chirpw", line 132, ina = mainapp.ChirpMain() File "/Users/uwe/Downloads/CHIRP-2.app/Contents/Resources/chirp/chirp/ui/mainapp.py", line 2266, in __init__ self._init_macos(mbar) File "/Users/uwe/Downloads/CHIRP-2.app/Contents/Resources/chirp/chirp/ui/mainapp.py", line 2208, in _init_macos LOG.error("No MacOS support: %s" % e) NameError: global name 'e' is not defined
The following patch resolves the e not defined issue:
--- Contents/Resources/chirp/chirp/ui/mainapp_old.py 2021-02-28 19:40:50.000000000 +1100 +++ Contents/Resources/chirp/chirp/ui/mainapp.py 2021-02-28 19:40:00.000000000 +1100 @@ -2193,14 +2193,14 @@ try: import gtk_osxapplication macapp = gtk_osxapplication.OSXApplication() - except ImportError: + except ImportError as e: pass # for gtk-mac-integration >= 2.0.7 try: import gtkosx_application macapp = gtkosx_application.Application() - except ImportError: + except ImportError as e: pass if macapp is None:
Updated by Bernhard Hailer over 3 years ago
- Status changed from New to Feedback
Hi Uwe, you may want to discuss this on the developers mailing list. Please read the wiki article Developers. Thanks!
Updated by Lynda Leung over 3 years ago
I too have this issue on one of my Macs. Using patch resolved the startup issue.
I've also tested this patch with the machine didn't have the startup issue, and it too ran fine.
Only thing I can think of is that I do have brew python 2.7.17 on one that had the issue, and 2.7.15 on the one that didnt have an issue. But I thought the unified package has it's own self contained environment?
Please merge this patch with the main branch for future releases, thanks.
Updated by Anonymous about 3 years ago
- Status changed from Feedback to Closed
- % Done changed from 0 to 100
Applied in changeset commit:48534b8ba9bf.