From jps at shezi.de Fri Apr 12 15:56:48 2013 From: jps at shezi.de (Johannes Spielmann) Date: Fri, 12 Apr 2013 15:56:48 +0200 Subject: [Pygui] KeyError: 'CFBundleName' while running PyGUI Cocoa in a VirtualEnv Message-ID: <037BC2FF-D102-47EA-9619-36E351E9CAE4@shezi.de> > 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. I saw that you never received an answer to this question (and also never incorporated that line into a new release). I just tried this and it works beautifully, thanks for your tip. Best regards, Johannes