[PyQt] Problem with uic.loadUiType

Rapczak, Jesse jrapczak at soe.sony.com
Mon Jan 23 17:13:13 GMT 2012


Sure. I'm trying to use the example here:

 

http://dl.dropbox.com/u/1633130/PyQt%20tuts/example1.py

http://dl.dropbox.com/u/1633130/PyQt%20tuts/example1.ui

 

This is from http://nathanhorne.com/?p=451

 

From: Panupat Chongstitwattana [mailto:panupatc at gmail.com] 
Sent: Monday, January 23, 2012 11:11 AM
To: Rapczak, Jesse
Subject: Re: [PyQt] Problem with uic.loadUiType

 

Can we see your code?



On Tue, Jan 24, 2012 at 12:04 AM, Rapczak, Jesse <jrapczak at soe.sony.com>
wrote:

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
_______________________________________________
PyQt mailing list    PyQt at riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120123/e815d0d9/attachment.html>


More information about the PyQt mailing list