[PyQt] pyuic4 crash in 4.7.6

Sybren A. Stüvel sybren at stuvel.eu
Tue Sep 7 10:02:56 BST 2010


Hi list,

I just upgraded from PyQt4 4.7.4 to 4.7.6, running on Python 2.6.6 on 
Windows XP. After the upgrade my pyuic4.bat doesn't work any more. 
Here is an example:

$ echo > test.ui

$ pyuic4.bat -d -x test.ui -o test.py
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\PyQt4\uic\port_v2\invoke.py", 
line 12, in invoke
    exit_status = driver.invoke()
  File "C:\Python26\lib\site-packages\PyQt4\uic\driver.py", line 37, 
in invoke
    self._generate()
  File "C:\Python26\lib\site-packages\PyQt4\uic\driver.py", line 60, 
in _generate
    pyfile = open(self._opts.output, 'wt', encoding='utf8')
TypeError: 'encoding' is an invalid keyword argument for this function

You see a cygwin prompt ($) but be assured that I've set up everything 
such that the native Windows version of Python is run, and not the 
Cygwin version. It's really the upgrade to 4.7.6 that induced this 
error.

Downgrading to 4.7.4 gives me an ExpatError on the above test.ui, 
which I expected because it's not a valid XML file. Building my real 
UI files works just fine after the downgrade.

Regards,
-- 
Sybren A. Stüvel

sybren at stuvel.eu
http://stuvel.eu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100907/e3bfa6a5/attachment.pgp>


More information about the PyQt mailing list