[PyQt] Problem with uic.loadUiType
Rapczak, Jesse
jrapczak at soe.sony.com
Mon Jan 23 17:04:21 GMT 2012
Hey all,
I'm relatively new to PyQt and am trying to use uic.loadUiType to load
up a .ui file at runtime. However, I'm getting the following error. I
must be doing something wrong... any ideas?
# Error: <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line
31)
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# File "c:\Tools\Maya\Common\Utilities\BranchSelector\example1.py",
line 40, in <module>
# listExample_form, listExample_base =
uic.loadUiType('C:\Tools\Maya\Common\Utilities\BranchSelector\example1.u
i')
# File "c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\__init__.py",
line 200, in loadUiType
# winfo = compiler.UICompiler().compileUi(uifile, code_string,
from_imports)
# File
"c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\Compiler\compiler.py",
line 55, in __init__
# CompilerCreatorPolicy())
# File "c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\uiparser.py",
line 127, in __init__
# self.factory = QObjectCreator(creatorPolicy)
# File "c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\objcreator.py",
line 91, in __init__
# if load_plugin(open(filename), plugin_globals, plugin_locals):
# File
"c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\port_v2\load_plugin.py",
line 47, in load_plugin
# raise WidgetPluginError("%s: %s" % (e.__class__, str(e)))
# WidgetPluginError: <type 'exceptions.SyntaxError'>: invalid syntax
(<string>, line 31) #
Thanks!
--
Jesse Rapczak
More information about the PyQt
mailing list