pyuic AttributeError in RedHat 9

Dave shuvit at 127.0.0.1
Thu Oct 16 15:12:55 EDT 2003


I just upgraded to Redhat 9, and I'm now seeing problems with PyQt programs
that worked in Redhat 8.  Here is an example from a simple demo program
created with qt-designer, compiled with pyuic, and run under python2.2:

[macquigg at saguaro foodx]$ python2.2 food.py
Traceback (most recent call last):
  File "food.py", line 34, in ?
    win = MainWindow()
  File "mainwindow.py", line 22, in __init__
    self.fileNewAction.setIconSet(QIconSet(QPixmap.fromMimeSource("")))
AttributeError: fromMimeSource

It was a rough upgrade, with lots of files failing the verification test, so
first thing I did is force upgrade qt-designer, PyQt, sip, and python.

[root at saguaro lib]# rpm -Uvh
/home/macquigg/rpm/redhat/qt-designer-3.1.1-6.i386.rpm --replacepkgs
Preparing...                ##################################[100%]
   1:qt-designer            ##################################[100%]
[root at saguaro lib]# rpm -V qt-designer
[root at saguaro lib]# rpm -Uvh
/home/macquigg/rpm/redhat/python-2.2.2-26.i386.rpm --replacepkgs
Preparing...                ##################################[100%]
   1:python                 ##################################[100%]
[root at saguaro lib]# rpm -V python
[root at saguaro lib]# rpm -Uvh
/home/macquigg/rpm/redhat/PyQt-3.5-5.i386.rpm --replacepkgs
Preparing...                ##################################[100%]
   1:PyQt                   ##################################[100%]
[root at saguaro lib]# rpm -V PyQt
[root at saguaro lib]# rpm -Uvh
/home/macquigg/rpm/redhat/sip-3.5-2.i386.rpm --replacepkgs
Preparing...                ##################################[100%]
   1:sip                    ##################################[100%]
[root at saguaro lib]# rpm -V sip
[root at saguaro lib]#

I also re-opened the project in the new qt-designer, and resaved the .ui
files, then recompiled the .py files.  The new .py files are definitely
different, but I suppose this is to be expected.

--> Old mainwindow.py:
 self.fileNewAction = QAction(self,"fileNewAction")
 self.fileNewAction.setIconSet(QIconSet(uic_load_pixmap_MainWindow("")))

--> New mainwindow.py:
 self.fileNewAction = QAction(self,"fileNewAction")
 self.fileNewAction.setIconSet(QIconSet(QPixmap.fromMimeSource("")))

The AttributeError remains.  Any suggstions what to try next?



Note:  I have also installed python2.3 (from python.org).  They say they
have been careful not to step on previous files, but I suppose there is a
possibility.

-- Dave








More information about the Python-list mailing list