[PyQt] Bug in pyuic4 when used with python 3.1

Ravi Kumar rks.039.programming at gmail.com
Wed Nov 18 11:08:44 GMT 2009


I have discovered a bug in pyuic4.

Versions :
os        : ubuntu linux 9.10 (Karmic Koala)
python : 3.1
qt         : 4.5.3
pyqt     : 4.6.1
sip       : 4.9.1

I have installed both Qt and PyQt via downloading sources and compiling it
myself.

Bug Description :
Any MainWindow created via designer which contains a toolbar, failes to
compile to python code via pyuic4.

Steps to reproduce this bug :
1. Open Designer, create a MainWindow
2. Add a toolbar to it
3. Save the .ui file.
4. Invoke pyuic4 on it, with -d option

It will show a python exception at line:240 in
$PYQT_HOME/lib/python3.1/site-packages/PyQt4/uic/uiparser.py
It says that 'basestring' doesnt exist.

Indeed, in Python-3.1 there is no such type as 'basestring'.
Changing 'basestring' to just 'str' seems to fix this for me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091118/b6134e90/attachment.html


More information about the PyQt mailing list