Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#27801 closed defect (fixed)

timedrive @0.3.1 fails to start giving "AttributeError: 'module' object has no attribute 'StackedWidget'"

Reported by: andreas.wilm@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: nerdling (Jeremy Lavergne)
Port: py27-pyqt4 timedrive

Description (last modified by nerdling (Jeremy Lavergne))

Hi all,

now that timedrive uses python-2.7 (see #27645) I get the following error on startup:

$ time-drive-2.7
Traceback (most recent call last):
  File "/opt/local/bin/time-drive-2.7", line 29, in <module>
    main()
  File "/opt/local/bin/time-drive-2.7", line 24, in main
    window = MainWindow()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/timedrive/app.py", line 35, in __init__
    gui_utils.loadUi(self, "uiMainWindow.ui")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/timedrive/utils/gui_utils.py", line 43, in loadUi
    uic.loadUi(utils.find_file(uiFile), self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/__init__.py", line 185, in loadUi
    return DynamicUILoader().loadUi(uifile, baseinstance)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/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.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 839, in parse
    actor(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 686, in createUserInterface
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 406, in createLayout
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 443, in handleItem
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 406, in createLayout
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 443, in handleItem
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 406, in createLayout
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 443, in handleItem
    self.traverseWidgetTree(elem)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 664, in traverseWidgetTree
    handler(self, child)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 161, in createWidget
    QtGui.QScrollArea, QtGui.StackedWidget,
AttributeError: 'module' object has no attribute 'StackedWidget'

Might be a PytQt bug instead. I have py27-pyqt4 @4.8.2 installed

Andreas

Change History (7)

comment:1 Changed 13 years ago by jmroot (Joshua Root)

Keywords: timedrive AttributeError StackedWidget removed
Owner: changed from macports-tickets@… to snc@…

Please remember to cc the maintainer.

comment:2 Changed 13 years ago by nerdling (Jeremy Lavergne)

Cc: michaelld@… added
Description: modified (diff)
Port: py27-pyqt4 added

comment:3 Changed 13 years ago by root42

FYI, this is a bug in PyQt4. If you manually change the "StackedWidget" in uiparser.py, line 161, to "QStackedWidget" the problem goes away. I do not know if this has been fixed yet, but my port is from 2 days ago, and the bug was still in there.

comment:4 Changed 13 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added; michaelld@… removed
Owner: changed from snc@… to michaelld@…
Port: timedrive py27-pyqt4py27-pyqt4 timedrive

comment:5 Changed 13 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

Fixed in r75342. timedrive now works for me using Python 2.7 ;)

comment:6 Changed 13 years ago by mf2k (Frank Schima)

@ michaelld: Shouldn't this fix be put into the py26-pyqt4 port too? We want to keep the portfiles as close as possible.

comment:7 Changed 13 years ago by michaelld (Michael Dickens)

Done in r75410.

Note: See TracTickets for help on using tickets.