<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.wrc13
        {mso-style-name:wrc13;}
span.wrc0
        {mso-style-name:wrc0;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Found the solution thanks to my colleague Christian Akesson:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><a href="http://christianakesson.com/2011/122">http://christianakesson.com/2011/122</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Crazy error.<o:p></o:p></p><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></a></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> pyqt-bounces@riverbankcomputing.com [mailto:pyqt-bounces@riverbankcomputing.com] <b>On Behalf Of </b>Rapczak, Jesse<br><b>Sent:</b> Tuesday, January 24, 2012 6:14 PM<br><b>To:</b> pyqt@riverbankcomputing.com<br><b>Subject:</b> Re: [PyQt] Problem with uic.loadUiType<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>But… why?? </span><span style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:pyqt-bounces@riverbankcomputing.com">pyqt-bounces@riverbankcomputing.com</a> [<a href="mailto:pyqt-bounces@riverbankcomputing.com">mailto:pyqt-bounces@riverbankcomputing.com</a>] <b>On Behalf Of </b>Rapczak, Jesse<br><b>Sent:</b> Tuesday, January 24, 2012 5:32 PM<br><b>To:</b> <a href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a><br><b>Subject:</b> Re: [PyQt] Problem with uic.loadUiType<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Panupat Chongstitwattana [<a href="mailto:panupatc@gmail.com">mailto:panupatc@gmail.com</a>] <br><b>Sent:</b> Monday, January 23, 2012 11:38 AM<br><b>To:</b> Rapczak, Jesse<br><b>Subject:</b> Re: [PyQt] Problem with uic.loadUiType<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Sorry I am unable to recreate the error. That line with uic runs fine on my end : /<o:p></o:p></p><div><p class=MsoNormal>On Tue, Jan 24, 2012 at 12:13 AM, Rapczak, Jesse <<a href="mailto:jrapczak@soe.sony.com">jrapczak@soe.sony.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Sure. I’m trying to use the example here:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://dl.dropbox.com/u/1633130/PyQt%20tuts/example1.py" target="_blank">http://dl.dropbox.com/u/1633130/PyQt%20tuts/example1.py</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://dl.dropbox.com/u/1633130/PyQt%20tuts/example1.ui" target="_blank">http://dl.dropbox.com/u/1633130/PyQt%20tuts/example1.ui</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This is from </span><a href="http://nathanhorne.com/?p=451" target="_blank">http://nathanhorne.com/?p=451</a><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a name="1350b8eb3e8f3814__MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></a><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Panupat Chongstitwattana [mailto:<a href="mailto:panupatc@gmail.com" target="_blank">panupatc@gmail.com</a>] <br><b>Sent:</b> Monday, January 23, 2012 11:11 AM<br><b>To:</b> Rapczak, Jesse<br><b>Subject:</b> Re: [PyQt] Problem with uic.loadUiType</span><o:p></o:p></p></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Can we see your code?<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Tue, Jan 24, 2012 at 12:04 AM, Rapczak, Jesse <<a href="mailto:jrapczak@soe.sony.com" target="_blank">jrapczak@soe.sony.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hey all,<br><br>I'm relatively new to PyQt and am trying to use uic.loadUiType to load<br>up a .ui file at runtime. However, I'm getting the following error. I<br>must be doing something wrong... any ideas?<br><br># Error: <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line<br>31)<br># Traceback (most recent call last):<br>#   File "<maya console>", line 1, in <module><br>#   File "c:\Tools\Maya\Common\Utilities\BranchSelector\example1.py",<br>line 40, in <module><br>#     listExample_form, listExample_base =<br>uic.loadUiType('C:\Tools\Maya\Common\Utilities\BranchSelector\example1.u<br>i')<br>#   File "c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\__init__.py",<br>line 200, in loadUiType<br>#     winfo = compiler.UICompiler().compileUi(uifile, code_string,<br>from_imports)<br>#   File<br>"c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\Compiler\compiler.py",<br>line 55, in __init__<br>#     CompilerCreatorPolicy())<br>#   File "c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\uiparser.py",<br>line 127, in __init__<br>#     self.factory = QObjectCreator(creatorPolicy)<br>#   File "c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\objcreator.py",<br>line 91, in __init__<br>#     if load_plugin(open(filename), plugin_globals, plugin_locals):<br>#   File<br>"c:\Tools\Maya\Version\2012\Utilities\PyQt4\uic\port_v2\load_plugin.py",<br>line 47, in load_plugin<br>#     raise WidgetPluginError("%s: %s" % (e.__class__, str(e)))<br># WidgetPluginError: <type 'exceptions.SyntaxError'>: invalid syntax<br>(<string>, line 31) #<br><br><br>Thanks!<br><span style='color:#888888'><br>--<br>Jesse Rapczak<br>_______________________________________________<br>PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br><a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></span><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>