code-google-com / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 "<maya console>", line 1, in <module>
#   File 
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/V
ersions/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 "<maya console>", line 1, in <module>
#   File 
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/V
ersions/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 reported on code.google.com by i...@nimajneb.com on 17 Aug 2012 at 7:17

GoogleCodeExporter commented 9 years ago
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?

Original comment by kgmcnama...@gmail.com on 12 Feb 2013 at 12:48