[PyQt] BUG: Qwt widgets in uic files

Arne Schmitz arne.schmitz at gmx.net
Mon Jan 24 14:35:30 GMT 2011


Hello pyqt community!

Please find attached a small test program that fails on my PyQt installation. I am using py26-pyqt4 @4.8.2 from MacPorts with a Python 2.6.6 interpreter from MacPorts on OS X 10.6.6. When loading a uic file in PyQt, I get the following error:

=== Cut here ===
Traceback (most recent call last):
  File "./pyqt-qwt-test.py", line 14, in <module>
    mainWindow = MyMainWindow()
  File "./pyqt-qwt-test.py", line 11, in __init__
    self.ui = uic.loadUi("MainWindow.ui", self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/__init__.py", line 185, in loadUi
    return DynamicUILoader().loadUi(uifile, baseinstance)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/Loader/loader.py", line 35, in loadUi
    return self.parse(filename, basedir)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 839, in parse
    actor(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 686, in createUserInterface
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 178, in createWidget
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 406, in createLayout
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 443, in handleItem
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 172, in createWidget
    self.stack.push(self.setupObject(widget_class, parent, elem))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/uiparser.py", line 140, in setupObject
    obj =  self.factory.createQObject(clsname, name, args, is_attribute)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/objcreator.py", line 69, in createQObject
    classType = self.findQObjectType(classname)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/objcreator.py", line 79, in findQObjectType
    w = module.search(classname)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyQt4/uic/Loader/qobjectcreator.py", line 30, in search
    self._module = __import__(self._moduleName, {}, {}, self._classes)
TypeError: 'set' object does not support indexing
=== Cut here ===

Best regards,

Arne Schmitz

-- 
Dipl.-Inform. Arne Schmitz              Phone   +49 (0)241 80-21817
Computer Graphics Group                 Mobile  +49 (0)151 29145947
RWTH Aachen University                  Fax     +49 (0)241 80-22899
Ahornstrasse 55, 52074 Aachen, Germany  http://www.rwth-graphics.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyqt-qwt-test.zip
Type: application/zip
Size: 1145 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110124/b95785b9/attachment.zip>


More information about the PyQt mailing list