[PyQt] DynamicUILoader().loadUi crash only when inside a decorated function?
Christopher Evans
chris.evans at gmail.com
Fri Sep 23 19:59:45 BST 2011
I am wrapping a tool in a decorator which just sends a mail with some info
on throw, however, the UIC module doesn't seem to like this.
File
"J:\data\Production\TechArt\Builds\Latest\Tools\CryMayaTools\CryRigging\rigTools\rigTools.py",
line 29, in __init__
self.ui = uic.loadUi(uiPath)
File
"J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\__init__.py",
line 221, in loadUi
return DynamicUILoader().loadUi(uifile, baseinstance)
File
"J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\Loader\loader.py",
line 50, in __init__
UIParser.__init__(self, QtCore, QtGui, LoaderCreatorPolicy())
File
"J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\uiparser.py",
line 127, in __init__
self.factory = QObjectCreator(creatorPolicy)
File
"J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\objcreator.py",
line 91, in __init__
if load_plugin(open(filename), plugin_globals, plugin_locals):
File
"J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\port_v2\load_plugin.py",
line 47, in load_plugin
raise WidgetPluginError("%s: %s" % (e.__class__, str(e)))
WidgetPluginError: : invalid syntax (, line 31)
Here's what the decorator looks like; pretty simple:
http://pastebin.com/zrdjCKfa
--
CE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110923/1e79c642/attachment.html>
More information about the PyQt
mailing list