LumaPictures / pymel

Python in Maya Done Right
Other
498 stars 132 forks source link

Instancing pymel.core.nodetypes.Locator() results in error #313

Open pmolodo opened 9 years ago

pmolodo commented 9 years ago

From i...@nimajneb.com on August 17, 2012 12:17:01

Describe the problem. I'm attempting to create a locator via pymel with the following code:

import pymel.core as pm pm.nodetypes.Locator(n='test')

Which results in this error:

Error: line 1: unexpect result test returned by spaceLocator

Traceback (most recent call last):

File "", line 1, in

File "/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/core/general.py", line 1747, in new

raise ValueError, "unexpect result %s returned by %s" % ( res, cls.melcmd.name )

ValueError: unexpect result test returned by spaceLocator

however, creating via maya.cmds seems to work: import maya.cmds as cmds cmds.spaceLocator(n='test')

returns:

Result: [u'test']

The pymel version should be a legal call, no? I'm I doing something wrong or did I hit a bug? What Version of Maya are you using? 2013, x64, no service packs On what operating system? (be as specific as possible and include service packs, 64bit vs 32bit, etc) os x, 10.6.8 What Version of PyMEL are you using? 1.0.4 (I believe that is what shipped with Maya 2013) What is the expected output? What do you see instead? Expected:

Result: [nt.Transform(u'test1')]

Got:

Error: line 1: unexpect result test returned by spaceLocator

Traceback (most recent call last):

File "", line 1, in

File "/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/core/general.py", line 1747, in new

raise ValueError, "unexpect result %s returned by %s" % ( res, cls.melcmd.name )

ValueError: unexpect result test returned by spaceLocator # If possible, provide a few lines of code to reproduce the problem. It helps us if your code will reproduce the problem from a new scene. See Above. Does maya.cmds exhibit the same problem? No. Please provide any additional information below.

Original issue: http://code.google.com/p/pymel/issues/detail?id=279

pmolodo commented 9 years ago

From kgmcnama...@gmail.com on February 11, 2013 16:48:08

I get the same error. I am not passing in any arguments. A script as simple as this:

from pymel.core import * nodetypes.Locator()

Throws the following error even though it seems to successfully create the locator:

Error: ValueError: file C:\Program Files\Autodesk\Maya2013.5\Python\lib\site-packages\pymel\core\general.py line 1747: unexpect result locator2 returned by spaceLocator

Has anyone figured this out?