Yea just sounds like you are getting unexpected types which you are then applying to the string formatting.
On Thu, Jun 19, 2014 at 12:10 PM, Brian Eyre <[email protected]> wrote: > Thanks folks, > > Yeah, it seems to be an issue purely with the shelf popup menu text entry > field. The code works fine in in the single and double-click fields for > the same button, and in the script editor. Weird. > > I guess I'll just have to refrain from using that type of formatting.. > > > On Thursday, June 19, 2014 5:02:05 AM UTC-7, Anthony Tan wrote: > >> Aaand of course, couldn't resist playing instead of cooking dinner for >> myself. Trying this: >> >> print r"what does %s do?" >> >> and I get: >> >> what does {'1': u'False'} do? >> >> >> Bah. >> >> >> >> >> On 19 Jun 2014, at 11:52, Justin Israel <[email protected]> wrote: >> >> Can see a reason for that to fail. Does it just say syntax error? >> On Jun 18, 2014 3:38 PM, "Brian Eyre" <[email protected]> wrote: >> >>> Hi, >>> >>> I was getting intermittent syntax errors from code entered into the *popup >>> menu* of a shelf button, and have narrowed it down to an issue with >>> using '%' in string formatting. Example: >>> >>> text = 'working' >>> print 'why is this command not %s'%text >>> >>> I'm wondering if this is a known issue, or if anyone has a solution? >>> >>> Cheers! >>> >>> Brian. >>> >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Python Programming for Autodesk Maya" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/python_inside_maya/284cbc26-51e7-4fcd-9e5f- >>> ddbbc4eba3d6%40googlegroups.com >>> <https://groups.google.com/d/msgid/python_inside_maya/284cbc26-51e7-4fcd-9e5f-ddbbc4eba3d6%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit https://groups.google.com/d/ >> msgid/python_inside_maya/CAPGFgA1nHA1uO4fgSkyBo57qCgmmo >> jASRxHkfMqrqLE8yoXb7A%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1nHA1uO4fgSkyBo57qCgmmojASRxHkfMqrqLE8yoXb7A%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/d8bc1841-61ef-4b6a-a212-aed4dec53620%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/d8bc1841-61ef-4b6a-a212-aed4dec53620%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0ejqAyEgpJSidKiO7OotZtdhcuh_Yg5WgCMtPHwOgtPA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
