[PyQt] pyuic4 crash in 4.7.6

Phil Thompson phil at riverbankcomputing.com
Tue Sep 7 10:10:56 BST 2010


On Tue, 7 Sep 2010 11:02:56 +0200, "Sybren A. Stüvel" <sybren at stuvel.eu>
wrote:
> 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

As a workaround, edit the driver.py file and remove the encoding argument
from the call to open().

Phil


More information about the PyQt mailing list