You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Maya2022, (pymel 1.2, python 3.7.7) Windows 64bit
REPRO
It appears that there is an issue with the setAttr not accepting ‘force’(‘f’) argument
Functionality that previously existed in pymel 1.09 with Maya2020
This is a core functionality in pymel (shown even in the example demo docs). Raising concerns with unknown how much other functionality didn’t quite make it over to the large python3 upgrade to pymel.
Repro Test Case
import pymel.core as pm
transform, shape = pm.polyCube()
transform.setAttr("foo", "bar", force = True)
Result
Traceback (most recent call last):
Error: Invalid arguments for flag 'ln'. Expected string, got ( str, str, str )
Traceback (most recent call last):
File "", line 3, in
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 747, in setAttr
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\general.py", line 586, in setAttr
dt='string')
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\general.py", line 768, in addAttr
res = cmds.addAttr(*args, **kwargs)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\internal\pmcmds.py", line 217, in addAttr_wrapped
res = new_cmd(*new_args, **new_kwargs)
TypeError: Invalid arguments for flag 'ln'. Expected string, got ( str, str, str )
Expected Result
Create a Cube object. Cube has a string attribute with longName = ‘foo’, value is set to ‘bar’.
Other Things worth Note.
Looking at the source code. Issue appears to be that
Pymel.util.nameparse.Attribute class is iterable in Python3 but not iterable in python2. This is causing problems with the pymel.internal.pmcmds.getMelRepresentation
The text was updated successfully, but these errors were encountered:
Using Maya2022, (pymel 1.2, python 3.7.7) Windows 64bit
REPRO
It appears that there is an issue with the setAttr not accepting ‘force’(‘f’) argument
Functionality that previously existed in pymel 1.09 with Maya2020
This is a core functionality in pymel (shown even in the example demo docs). Raising concerns with unknown how much other functionality didn’t quite make it over to the large python3 upgrade to pymel.
Repro Test Case
import pymel.core as pm
transform, shape = pm.polyCube()
transform.setAttr("foo", "bar", force = True)
Result
Traceback (most recent call last):
Error: Invalid arguments for flag 'ln'. Expected string, got ( str, str, str )
Traceback (most recent call last):
File "", line 3, in
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\nodetypes.py", line 747, in setAttr
return general.setAttr("%s.%s" % (self, attr), *args, **kwargs)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\general.py", line 586, in setAttr
dt='string')
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\core\general.py", line 768, in addAttr
res = cmds.addAttr(*args, **kwargs)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\internal\pmcmds.py", line 217, in addAttr_wrapped
res = new_cmd(*new_args, **new_kwargs)
TypeError: Invalid arguments for flag 'ln'. Expected string, got ( str, str, str )
Expected Result
Create a Cube object. Cube has a string attribute with longName = ‘foo’, value is set to ‘bar’.
Other Things worth Note.
Looking at the source code. Issue appears to be that
Pymel.util.nameparse.Attribute class is iterable in Python3 but not iterable in python2. This is causing problems with the pymel.internal.pmcmds.getMelRepresentation
The text was updated successfully, but these errors were encountered: