problem with py2app and Qt/PyQt

tangle1 at tangle1 at
Wed Jun 24 16:34:20 PDT 2009

Thank you Ryan, Olivier, James for your feedback. When I came in this morning, the port install of py25-pyqt4 was complete. 

I have a problem with my app build using py2app ... perhaps you can help. Its related to Qt/PyQt and possibly an issue with QImage and missing jpg encoder. 

My python script uses PyQt to display 8 jpg image sequences in a multi-panel viewport. These images are generated from 8 cameras. I have a feeling the app cannot find jpg encoder. However everything works perfectly when I run same script directly from python. 
This works: 
> which python

But app created from py2app does not display images:
I created file according to instructions on the web and ran "python py2app".  
from setuptools import setup

APP = ['']
OPTIONS = {'argv_emulation': True, 'includes': ['sip','PyQt4._qt','PyQt4.QtCore','PyQt4.QtGui'],
	options={'py2app': OPTIONS},


... so when I double-click under dist folder, the GUI launches fine. The interface shows image frame numbers as caching progresses, but the numbers change fast and no images are displayed. I saw this behavior when I first began development on Windows. In that case, I was getting output from terminal shell ... something like "QImage() called with null image". Someone said this was due to missing jpg encoder and our windows build engineer rebuilt my python environment ... and everything worked. 

Back in mac land, I ran my script,, via python interpreter. In this case, caching proceeded as expected and image playback worked. Since I don't get broken behavior from python interpreter I can only guess that somehow in the app build something is missing with respect to jpg encoding ... because the GUI behaviour totally works in all other respects.

Any help, hints would be greatly appreciated. 



More information about the macports-users mailing list