[Pythonmac-SIG] (PyQt and py2app) Gui starts in IDLE but not as app ...

Ronald Oussoren ronaldoussoren at mac.com
Fri May 4 09:25:32 CEST 2012


On 4 May, 2012, at 7:18, Jonathan Kossick wrote:

> Thanks a lot! Until now I just used the console. I'm new to python on OS X so I need some time to work me into.
> 
> There are some  interesting error messages: 
> 
> Class QCocoaColorPanelDelegate is implemented in both /Users/User/Desktop/Vokabelprogramm/Mac-Werkstatt/Programm-Ordner/voc2brain.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
> 
> This message is repeating several times because of different classes. Seemingly the application can't decide if it should use the installed Qt version or the version includet in the application file. While research I read something about  install_name_tool  but I'm still not sure how to fix the problem. 
> 
> Hope you can help me ...

I'm not sure what is causing this problem. As you noticed the application seems to load both the embedded copy of Qt (as it should) and the system-wide install (which shouldn't be used). This could explain why your program won't start.

The py2app respository contains an example that uses PyQt, you can download the two files for this example at <https://bitbucket.org/ronaldoussoren/py2app/src/tip/examples/PyQt>.  Does this example also fail?

And something I completely forgot to ask: which version of Python, PyQt, Qt and Py2app do you use? Is the python version the system installed one or a custom install (and if so, how did you install)?

Ronald
> 
> 
> Am Donnerstag, 3. Mai 2012 schrieb Ronald Oussoren :
> 
> On 3 May, 2012, at 14:28, Jonathan Kossick wrote:
> 
> > Hello, my problem is kind of weird.
> > As long as I run my PyQt application in IDLE everything works great but when I build an app by using py2app the gui doesn' t start.
> > I already did a little bit debugging but apparently the application crashes when I want do show the gui (main.show()). The application just stops and there is no useful message ...
> >
> > If i make a really short application which just starts the gui then everything works fine. My application is really big wherefore I dont know where to search the problem first. Why does the problem just appeal if I build the app and not if i start it in IDLE? Where can I start to search the problem?
> >
> > Any ideas? Unfortunately I cant give more informations ...
> 
> You can start the application from the command line and that might give you some more clues. The way to do that for "HelloWorld.app" is to run  "HelloWorld.app/Contents/MacOS/HelloWorld" as a normal shell command in the terminal application.  Any error messages that get printed during startup are now shown in the terminal window.
> 
> Ronald
> 
> > _______________________________________________
> > Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> > http://mail.python.org/mailman/listinfo/pythonmac-sig
> > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20120504/7710ca65/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4788 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20120504/7710ca65/attachment.bin>


More information about the Pythonmac-SIG mailing list