[PyQt] PyQt and cx_Freeze

Constantin, Michael Constantinm at sharplabs.com
Fri Jun 21 22:28:08 BST 2013


Hi,
I'm trying to build an app written with PyQt and ran into this error, see below.
It seems the same issue that was reported here: http://www.riverbankcomputing.com/pipermail/pyqt/2010-September/027896.html
But I don't see a resolution. It says that is a cx_Freeze bug... is there any workaround to this?

BTW, I'm also using the python_qt_binding package as described in http://qt-project.org/wiki/Differences_Between_PySide_and_PyQt under "Supporting Both APIs":
https://github.com/ros-visualization/python_qt_binding
although I don't think is important as far as this error is concerned.

Thanks,
Michael

Building standalone executable...
running install
running build
running build_py
running build_scripts
running build_exe
Traceback (most recent call last):
  File "C:\Users\constantinm\.eclipse\org.eclipse.platform_3.7.0_849111498\plugins\org.python.pydev_2.7.1.2012100913\pysrc\pydevd.py", line 1397, in <module>
    debugger.run(setup['file'], None, None)
  File "C:\Users\constantinm\.eclipse\org.eclipse.platform_3.7.0_849111498\plugins\org.python.pydev_2.7.1.2012100913\pysrc\pydevd.py", line 1090, in run
    pydev_imports.execfile(file, globals, locals) #execute the script
  File "C:\gitrepo\nuxeo-drive\setup.py", line 292, in <module>
    **freeze_options
  File "C:\Python27\Lib\site-packages\cx_Freeze\dist.py", line 361, in setup
    distutils.core.setup(**attrs)
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
   self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\Lib\site-packages\cx_Freeze\dist.py", line 231, in run
    freezer.Freeze()
  File "C:\Python27\Lib\site-packages\cx_Freeze\freezer.py", line 518, in Freeze
    self.finder = self._GetModuleFinder()
  File "C:\Python27\Lib\site-packages\cx_Freeze\freezer.py", line 304, in _GetModuleFinder
    finder.IncludePackage(name)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 533, in IncludePackage
    self._ImportAllSubModules(module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 202, in _ImportAllSubModules
    deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 329, in _LoadModule
    namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 374, in _LoadPackage
    self._LoadModule(name, fp, path, info, deferredImports, parent)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 452, in _ScanCode
    module, relativeImportIndex)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 246, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 452, in _ScanCode
    module, relativeImportIndex)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 246, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 329, in _LoadModule
    namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 374, in _LoadPackage
    self._LoadModule(name, fp, path, info, deferredImports, parent)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 452, in _ScanCode
    module, relativeImportIndex)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 246, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 452, in _ScanCode
    module, relativeImportIndex)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 246, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 301, in _InternalImportModule
    namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 329, in _LoadModule
    namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 374, in _LoadPackage
    self._LoadModule(name, fp, path, info, deferredImports, parent)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 452, in _ScanCode
    module, relativeImportIndex)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 266, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 489, in _ScanCode
    topLevel = False)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 489, in _ScanCode
    topLevel = False)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 457, in _ScanCode
   fromList, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 128, in _EnsureFromList
    self._ImportModule(subModuleName, deferredImports, caller)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 230, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 329, in _LoadModule
    namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 374, in _LoadPackage
    self._LoadModule(name, fp, path, info, deferredImports, parent)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 457, in _ScanCode
    fromList, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 128, in _EnsureFromList
    self._ImportModule(subModuleName, deferredImports, caller)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 230, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 457, in _ScanCode
    fromList, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 128, in _EnsureFromList
    self._ImportModule(subModuleName, deferredImports, caller)
 File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 230, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 364, in _LoadModule
    self._ScanCode(module.code, module, deferredImports)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 452, in _ScanCode
    module, relativeImportIndex)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 246, in _ImportModule
    deferredImports, namespace = namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 317, in _InternalImportModule
    parentModule, namespace)
  File "C:\Python27\Lib\site-packages\cx_Freeze\finder.py", line 342, in _LoadModule
    module.code = compile(codeString, path, "exec")
  File "C:\Python27\Lib\site-packages\PyQt4\uic\port_v3\proxy_base.py", line 31
    class ProxyBase(metaclass=ProxyMetaclass):
                             ^
SyntaxError: invalid syntax
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130621/eb37655f/attachment-0001.html>


More information about the PyQt mailing list