[PyQt] Problem with uic.loadUiType

Rapczak, Jesse jrapczak at soe.sony.com
Wed Jan 25 00:14:10 GMT 2012


Weird, I ran the example code in my C:\Python26 directory, then
re-copied the PyQt4 folder from site-packages to Maya's Python
interpreter path and everything works now.

 

But... why?? J

 

From: pyqt-bounces at riverbankcomputing.com
[mailto:pyqt-bounces at riverbankcomputing.com] On Behalf Of Rapczak, Jesse
Sent: Tuesday, January 24, 2012 5:32 PM
To: pyqt at riverbankcomputing.com
Subject: Re: [PyQt] Problem with uic.loadUiType

 

Hmm, I'm dumbfounded. Anyone else have any idea what could cause this
not to work on my system? PyQt works fine otherwise, inside of Maya and
out.

 

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

 

Sorry I am unable to recreate the error. That line with uic runs fine on
my end : /



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

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/20120124/50667a3f/attachment.html>


More information about the PyQt mailing list