The error is telling you that you're trying to call int() against something 
that it doesn't understand how to make an int - in this case the string "0.01". 
You probably want float() instead for this case..


On 27 Feb 2013, at 17:35, Ali A. Jafri wrote:

> Code is fine. Are you sure that you had geometry selected when you ran this 
> code?
> 
> 
> On Wed, Feb 27, 2013 at 1:35 PM, Aviraj Mahadik <aviraj...@gmail.com> wrote:
> I am trying to create tool using python. I am completely new to python. 
> please help.
> Code is:
> 
> import maya.cmds as mc
> pdStatus = mc.promptDialog(message="Merge Threshold", button="OK")
> if pdStatus == "OK":
>     numThresh = mc.promptDialog(query=True, text=True)
>     numThresh = int(numThresh)
>     mc.polyMirrorFace(mt=numThresh)
> 
> And following error occurs:
> 
> # Error: ValueError: file <maya console> line 5: invalid literal for int() 
> with base 10: '0.01'
> 
> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To post to this group, send email to python_inside_maya@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> 
> 
> -- 
> Ali A. Jafri
> www.cgrama.com
> 
> -- 
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To post to this group, send email to python_inside_maya@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To post to this group, send email to python_inside_maya@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to