# Serpens document(English) Update date 2020/08/11 [Serpens document(日本語)](https://hackmd.io/s/ByN_oEcg7) ## Error-prone list ### If you encounter assigned a variable to an argument the following error... #### mel ![](https://i.imgur.com/byMovRL.png) ```c= $Cube_=`polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1 -n "Cube"`; $Sphere_ = `polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1 -n "Sphere"`; string $arrowGRP = `group -n test -p $Cube_ $Sphere_`; ``` #### converted python ![](https://i.imgur.com/PYdaqoQ.png) ```python= import maya.cmds as cmds Cube_ = cmds.polyCube(sz=1, sy=1, sx=1, d=1, cuv=4, h=1, n="Cube", ch=1, w=1, ax=(0, 1, 0)) Sphere_ = cmds.polySphere(cuv=2, sy=20, ch=1, sx=20, r=1, ax=(0, 1, 0), n="Sphere") arrowGRP = str(cmds.group(Sphere_, p=Cube_, n='test')) ``` #### Error code: ```python= # Error: line 1: Invalid arguments for flag 'p'. Expected string, got [ unicode, unicode ] # Traceback (most recent call last): # File "<maya console>", line 11, in <module> # TypeError: Invalid arguments for flag 'p'. Expected string, got [ unicode, unicode ] # ``` function Cube_ is list. You must change **Cube_** to **Cube_[0]**. ```python= arrowGRP = str(cmds.group(Sphere_, p=Cube_[0], n='test')) ``` Or, The Mel needs changing. #### mel ```c= $Cube_ = `polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1 -n "Cube"`; $Sphere_ = `polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1 -n "Sphere"`; string $arrowGRP = `group -n test -p Cube Sphere`; ``` #### converted python ```python= import maya.cmds as cmds Cube_ = cmds.polyCube(sz=1, sy=1, sx=1, d=1, cuv=4, h=1, n="Cube", ch=1, w=1, ax=(0, 1, 0)) Sphere_ = cmds.polySphere(cuv=2, sy=20, ch=1, sx=20, r=1, ax=(0, 1, 0), n="Sphere") arrowGRP = str(cmds.group('Sphere', p='Cube', n='test')) ```