[PyQt] bug: Python 2 exception in PyQt-Py3.1-gpl-4.8.1-1

Hans-Peter Jansen hpj at urpla.net
Fri Dec 3 22:21:25 GMT 2010


On Friday 03 December 2010, 21:47:06 Daniel Goertzen wrote:
> While running cx_freeze with an installation of
> PyQt-Py3.1-gpl-4.8.1-1, I got the following error:
>
>
>   File
> "C:\Python31\lib\site-packages\PyQt4\uic\port_v2\load_plugin.py",
                                           ^^^^^^^
> line 17
>     except Exception, e:
>                     ^
> SyntaxError: invalid syntax
> make: *** [freeze] Error 1
>
>
>
> Changing the line to a Python 3 style exception fixed it:
>
>   except Exception as e:

but it should have picked up port_v3, if things would had gone right. 
For some reason, cx_freeze picked the wrong interpreter. 

You may also try using PyInstaller, which has explicit PyQt4 support.

Pete


More information about the PyQt mailing list