[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] DynamicUILoader().loadUi crash only when inside a decorated
From:       Christopher Evans <chris.evans () gmail ! com>
Date:       2011-09-23 18:59:45
Message-ID: CAEdZ1gx2wt0cG+CKK_oUEkMQ3ZmDi8qdZQ_DtQchvRG+4w1OUw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

I am wrapping a tool in a decorator which just sends a mail with some info on throw, \
however, the UIC module doesn&#39;t seem to like this.<br><br>File \
&quot;J:\data\Production\TechArt\Builds\Latest\Tools\CryMayaTools\CryRigging\rigTools\rigTools.py&quot;, \
line 29, in __init__<br> self.ui = uic.loadUi(uiPath)<br>File \
&quot;J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\__init__.py&quot;, \
line 221, in loadUi<br>return DynamicUILoader().loadUi(uifile, baseinstance)<br>File \
&quot;J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\Loader\loader.py&quot;, \
line 50, in __init__<br> UIParser.__init__(self, QtCore, QtGui, \
LoaderCreatorPolicy())<br>File \
&quot;J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\uiparser.py&quot;, \
line 127, in __init__<br>self.factory = QObjectCreator(creatorPolicy)<br> File \
&quot;J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\objcreator.py&quot;, \
line 91, in __init__<br>if load_plugin(open(filename), plugin_globals, \
plugin_locals):<br>File \
&quot;J:\data\Production\TechArt\Builds\Latest\Tools\libs\PyQt4\uic\port_v2\load_plugin.py&quot;, \
line 47, in load_plugin<br> raise WidgetPluginError(&quot;%s: %s&quot; % \
(e.__class__, str(e)))<br>WidgetPluginError: : invalid syntax (, line \
31)<br><br>Here&#39;s what the decorator looks like; pretty simple:<br><a \
href="http://pastebin.com/zrdjCKfa">http://pastebin.com/zrdjCKfa</a><br> <br>-- \
<br>CE<br><br>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic