Search code examples
pythonuser-interfacemaya

Error: RuntimeError: Object's name 'Done' is not unique. in Maya python


I am creating a Ui using maya python cmd.

My code is given below..

code

import maya.cmds as cmds

window = cmds.window( title="Render",widthHeight=(300,200),minimizeButton=True,maximizeButton=True )       

inner_child_5 = cmds.rowColumnLayout(numberOfColumns=2)

for val in range(0,2):     
    cmds.checkBox(label="layer")
    cmds.text("Done",width=150, height=10,align='left')
cmds.showWindow( window )

I have stuck on an error please help me to solve this error

Error:

Error: RuntimeError: file line 6: Object's name 'Done' is not unique.


Solution

  • There was a silly mistake. i forget to put label on line 6....

    cmds.text(label = "Done",width=150, height=10,align='left')