Hi, I'm developing a PyObjC application in Xcode and Interface Builder, and am having a problem related to py2app and Xcode. I can build and run my application just fine under development, but am having a problem with running the application in deployment (build works just fine). I can build my app just fine from the command line ($ python setup.py py2app), however, when I try and run the application, I am getting the following error:
KeyError: u'PyObjCXcode' and the result from the Console: Traceback (most recent call last): File "/Users/craig/src/HomeApp/dist/HomeApp.app/Contents/Resources/__boot__.py", line 31, in ? _run('HomeApp.py') File "/Users/craig/src/HomeApp/dist/HomeApp.app/Contents/Resources/__boot__.py", line 28, in _run execfile(path, globals(), globals()) File "/Users/craig/src/HomeApp/dist/HomeApp.app/Contents/Resources/HomeApp.py", line 9, in ? info = NSBundle.mainBundle().infoDictionary()[u'PyObjCXcode'] File "objc/_convenience.pyc", line 187, in __getitem__objectForKey_ File "objc/_convenience.pyc", line 523, in container_unwrap KeyError: u'PyObjCXcode' 2008-10-10 01:03:22.675 HomeApp[3298] HomeApp Error 2008-10-10 01:03:22.676 HomeApp[3298] An unexpected error has occurred during execution of the main script KeyError: u'PyObjCXcode' The only reference I've found to a problem like this is here: http://osdir.com/ml/python.pyobjc.devel/2005-11/msg00015.html The workaround solution offered there was: "the workaround is to recompile the bootstrap in py2app. If you delete it (py2app/bundletemplate/prebuilt/main I think) then it should recompile itself next time you build an app" I deleted prebuilt/main, but it didn't fix the problem. For reference, I have two versions of python installed, 2.4.4 and 2.5, but 2.4.4 is set as my default. I'm running Mac OS X.4.11 on PowerPC. My Py2app is only installed for python 2.4.4. I had a prior compatibility problem between Xcode & Py2app, in that Xcode did not see Py2app (presumable because Xcode used 2.5, not 2.4.4), but got around this by writing a custom build command that invokes 2.4.4. My hunch is that the problem is related to the key PyObjCXcode not existing within the infoDictionary for the mainBundle. The error happens at the line: info = NSBundle.mainBundle().infoDictionary()[u'PyObjCXcode'] Beyond this, however, I'm at a loss. Any ideas? Thanks in advance, Craig The only other reference I've found to a keyerror like this is here: _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig