[Pygui] KeyError: 'CFBundleName' while running PyGUI Cocoa in a VirtualEnv

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 22 23:00:13 CET 2012


Georges Martin wrote:

> I got a KeyError: 'CFBundleName' exception when running PyGUI in a 
> VirtualEnv on OS X 10.6.6.

PyGUI on MacOSX assumes it's running on a framework installation of
Python, in which the Python executable is actually inside an app
bundle. I have no experience with virtualenv, but it looks like
you're either running a non-framework Python or the virtualenv is
making it look that way to MacOSX.

You could try changing this line in Application.py:

     if ns_info['CFBundleName'] == "Python":

to something like:

     if ns_info.get('CFBundleName') in ("Python", None):

and see if it helps. If it does, let me know and I'll incorporate
it into the next release.

-- 
Greg


More information about the Pygui mailing list