[Pythonmac-SIG] py2app plugin problem: "Error loading code"

Niko Matsakis niko at alum.mit.edu
Sun Dec 10 08:25:48 CET 2006

All of a sudden, for reasons I completely fail to understand, py2app- 
created plug-ins will no longer load in my application.  I am not  
100% sure if this is the right list for this kind of question: feel  
free to set me straight.

The error I get is as follows:

2006-12-09 17:10:59.988 drachma[25673] *** -[NSBundle load]: Error  
loading code /Users/niko/hg/proj/drachma/src/build/Debug/drachma.app/ 
Contents/Resources/PyPlugin.plugin/Contents/MacOS/PyPlugin for  
bundle /Users/niko/hg/proj/drachma/src/build/Debug/drachma.app/ 
Contents/Resources/PyPlugin.plugin, error code 2 (link edit error  
code 0, error number 0 ())

The only slightly strange thing I noticed is that when I use "file"  
on the content of the plugin I get:

Resources/PyPlugin.plugin/Contents/MacOS/PyPlugin: Mach-O bundle i386

Which says "i386", but this is running on a PPC.  I tried to use the  
"--prefer-ppc" option, but I get the same result either way.

Any ideas on what's wrong, or where to find more information?  It  
doesn't seem to matter whether I use -A mode or not.

I am using a version of Python 2.4 from DarwinPorts; PyObjC was  
installed the same way.

What's very odd is that all of this USED to work --- I had to do a  
bit of a hack to make the -A mode work, introducing a .pth file into  
~/Library/Python/2.4/site-packages, but now nothing works, whether or  
not I add or remove that file.  The only thing I can think of that I  
did  in between is to attempt to build a "Release" version of the  
program instead of a "Debug" version, but now neither Release nor  
Debug works.

thanks in advance for any clues,


More information about the Pythonmac-SIG mailing list