Issue #112 new
created an issue

I have some troubles with py2app with all scripts that I developed with pyqt4 (maybe the problem is not related to pyqt4, but if I test py2app with simple application like 'Hello world' script all works just fine). I am using last MacPorts version (MacPorts-2.1.3-10.8-MountainLion) with python 2.7.4 and py2app 0.7.3. After two days of testing I cannot figure out what is wrong, is it a bug? file for py2app:

from setuptools import setup

APP = ['']
OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4._qt', 'PyQt4.QtCore', 'PyQt4.QtGui'],
    'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon']}

      options={'py2app': OPTIONS},

And this is the log:

python py2app
running py2app
creating /Users/opensw/SkyDrive/SISSA/Kymograph/build/bdist.macosx-10.6-intel/python2.7-standalone/app
creating /Users/opensw/SkyDrive/SISSA/Kymograph/build/bdist.macosx-10.6-intel/python2.7-standalone/app/collect
creating /Users/opensw/SkyDrive/SISSA/Kymograph/build/bdist.macosx-10.6-intel/python2.7-standalone/app/temp
creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/lib-dynload
creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/Frameworks
*** using recipe: virtualenv ***
WARNING: ImportError in sip recipe ignored: No module named matplotlib-1
WARNING: ImportError in sip recipe ignored: No module named scipy-0
*** using recipe: sip ***
*** using recipe: matplotlib ***
*** using recipe: scipy ***
Traceback (most recent call last):
  File "", line 10, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 152, in setup
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 953, in run_commands
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 972, in run_command
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/", line 553, in run
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/", line 741, in _run
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/", line 816, in run_normal
    self.process_recipes(mf, filters, flatpackages, loader_files)
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/", line 710, in process_recipes
    find_needed_modules(mf, packages=rval['packages'])
  File "build/bdist.macosx-10.6-intel/egg/modulegraph/", line 199, in find_needed_modules
TypeError: 'NoneType' object has no attribute '__getitem__'

Comments (2)

  1. opensw reporter

    Hi :) I tried the py2app distribution examples about pyqt and this is the log:

    opensw:hello_app opensw$ python py2app
    Traceback (most recent call last):
      File "", line 8, in <module>
        import py2app
    ImportError: No module named py2app

    Something was wrong with my installation (from MacPorts). If I uninstall py2app from MacPorts and compile the source code by myself everything is working like expected for the pyqt distribution examples, but it is not working with my pyqt application (same error like above with and without includes/excludes options).

  2. Log in to comment