PDA

View Full Version : Capturing Error(Python)


pritishd
01-14-2011, 06:46 AM
Hello

I am using a script job to capture the selection, in order to alter the UI option. I get this weird error

# Error: line 1: Flag 'sl' must be passed a boolean argument # Traceback (most recent call last):
# File "<maya console>", line 1, in
# File "C:/Users/admin/Documents/maya/2011/scripts\PKD\rigging\GUI.py", line 1151, in <lambda>
# mc.scriptJob( e=["SelectionChanged",lambda*arg:self.refreshGUI()] )
# File "C:/Users/admin/Documents/maya/2011/scripts\PKD\rigging\GUI.py", line 1172, in refreshGUI
# selection=mc.ls(sl=True)


When I restart my GUI, which delete the script job and create a new one then it start working?

How can I capture this error so that I can loop untill the this error disappears

Cheers

Pritish

dbsmith
01-17-2011, 04:47 AM
Not sure about capturing the error per-say, but that particular error usually springs up when something else has gone wrong, its nothing to do with that line of code really.
For example, you may have saved the name of an object, deleted it, and you're trying to access it in code somewhere?

I've hit that particular error a few times, and usually means something weird is going on elsewhere.

CGTalk Moderation
01-17-2011, 04:47 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.