Opened 9 years ago
Closed 8 years ago
#48849 closed defect (fixed)
MyPaint, MyPaint-devel: ImportError: No module named AppKit
Reported by: | bunk3m (Bunk3m) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | su-v | |
Port: | MyPaint, MyPaint-devel |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Thought I should let you know that MyPaint-devel @1.2.0-beta.20150828+git.04511511_0 crashes on start.
I'm not sure how to debug to provide more info to track down what's happening but I'm happy to help if you have time to guide me through that.
The error I get from the Console app is:
2015-09-13 11:19:48.143 AM com.apple.xpc.launchd[1]: (com.github.mypaint.mypaint.MyPaint.5712[15553]) Service exited with abnormal code: 1
Attachments (1)
Change History (12)
comment:1 Changed 9 years ago by bunk3m (Bunk3m)
comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | MyPaint-devel removed |
Owner: | changed from macports-tickets@… to ryandesign@… |
When an app crashes, OS X creates a crash log file in the folder ~/Library/Logs/DiagnosticReports/. If you could attach the log file corresponding to this crash, that might give an idea of what happened.
However, the additional information you provided in comment:1 might already be enough for someone who understands MyPaint's code to figure this out. I am not such a person; you may want to report this problem to the developers of MyPaint, since the problem does not happen for me.
comment:3 Changed 9 years ago by bunk3m (Bunk3m)
THanks for your help. Glad to hear it works on your machine.
I checked the folder ~/Library/Logs/DiagnosticReports/ and there are no reports at all from the day of the crash. That is weird. The only report is in the console.app but only the one line.
I had no luck with regular MyPaint either. But I see there is an upstream issue from one of the bug reports.
I've posted bug reports with the devs on github in the past. It was frustrating and pointless.
comment:4 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Let's check some basics.
Have you installed Xcode, and opened it at least once? What version?
Have you installed the Xcode command line tools?
What's the output of:
xcodebuild -version clang -v
comment:5 Changed 9 years ago by bunk3m (Bunk3m)
Thanks Ryan,
I'm running OS10.10.5 and most recent version of Xcode.
Here is the output:
xcodebuild -version Xcode 6.4 Build version 6E35b
clang -v Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.5.0 Thread model: posix
comment:6 Changed 9 years ago by su-v
Same error:
Traceback (most recent call last): File "/Volumes/magenta/mp-trunk/x11/bin/mypaint", line 462, in <module> init_gettext(localepath, localepath_brushlib) File "/Volumes/magenta/mp-trunk/x11/bin/mypaint", line 267, in init_gettext lib.i18n.set_i18n_envvars() File "/Volumes/magenta/mp-trunk/x11/share/mypaint/lib/i18n.py", line 103, in set_i18n_envvars from AppKit import NSLocale ImportError: No module named AppKit
reproduced on OS X 10.7.5 with MyPaint-devel @1.2.0-beta.20150801+git.58c1dbba and 1.2.0-beta.20150828+git.04511511.
It seems that upstream changes for i18n would require new dependencies of the MyPaint-devel port for additional python modules (likely py27-pyobjc-cocoa
).
Attempts to test this by installing py27-pyobjc-cocoa
have not been successful on OS X 10.7.5 though:
import AppKit
in an interactive python session causes MacPorts' Python 2.7.10 itself to crash immediately. Possibly this crash (unrelated to MyPaint-devel) is an issue specific for latest
pyobjc
on older versions of OS X - I did not find a related ticket in MacPorts so far.
Changed 9 years ago by su-v
Attachment: | patch-MyPaint-devel-i18n.diff added |
---|
comment:8 Changed 9 years ago by su-v
The attached diff for MyPaint-devel adds a patch for lib/i18n.py
to check the success of importing AppKit at runtime (it will fall back to POSIX locale if NSLocale from AppKit fails to import).
Additionally the diff adds a new variant to MyPaint-devel: nslocale
. The variant could be used for testing locale support via AppKit/NSLocale on more recent versions of OS X - the variant simply adds py27-pyobjc-cocoa to the depends_lib [*].
--
[*] The diff was successfully tested on OS X 10.7.5 without AppKit module installed for MacPorts' Python 2.7 - I did not manage to get py27-pyobjc-cocoa working (importing AppKit crashes the main python process on Lion).
comment:9 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
MyPaint 1.2.0 has been released. Please test with that version, and if the problem persists, please report the problem to the developers of MyPaint so they can resolve it.
comment:10 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Port: | MyPaint added |
---|---|
Status: | new → assigned |
Summary: | MyPaint-devel crashes on start → MyPaint, MyPaint-devel: ImportError: No module named AppKit |
Issue still exists in 1.2.0 and was reported to the developers here.
Workaround is:
sudo port install py27-pyobjc-cocoa
comment:11 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've tried a few things and hope these may be helpful in determining what the problem is: