I think we've found a problem with Pymel in Maya 2013 when the UI is set to
Japanese (we have yet to test in Chinese, but the issue may also exist there.)
It seems to exist on both OS X and Windows.
Even in a blank scene in a freshly started Maya instance executing the
following code in the script editor:
import pymel.core as pa
pa.ls()
produces the following traceback:
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/core/general.py",
line 1003, in ls
# return map(PyNode, res)
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/core/general.py",
line 1687, in __new__
# pymelType, obj = _getPymelType( argObj, name )
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/core/general.py",
line 100, in _getPymelType
# pymelType = _getPymelTypeFromObject( obj, name )
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/core/general.py",
line 33, in _getPymelTypeFromObject
# pymelType = getattr( nodetypes, _util.capitalize(mayaType),
nodetypes.DependNode )
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/util/utilitytypes.py",
line 623, in __get__
# self.newobj = self.creator(*self.args, **self.kwargs)
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/internal/factories.py",
line 2676, in addPyNodeCallback
# ParentPyNode = getattr( dynModule, parentPyNodeTypeName )
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/util/utilitytypes.py",
line 623, in __get__
# self.newobj = self.creator(*self.args, **self.kwargs)
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/internal/factories.py",
line 2688, in addPyNodeCallback
# PyNodeType = MetaMayaNodeWrapper(pyNodeTypeName, (ParentPyNode,),
classDict)
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/internal/factories.py",
line 2592, in __new__
# addMayaType( nodeType )
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/internal/factories.py",
line 2799, in addMayaType
# apiType = mayaTypeToApiType(mayaType)
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/internal/factories.py",
line 3080, in mayaTypeToApiType
# obj = apicache._makeDgModGhostObject(mayaType, dagMod, dgMod)
# File
"/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/internal/apicache.py",
line 60, in _makeDgModGhostObject
# _logger.debug("Error trying to create ghost node for '%s': %s" %
(mayaType, err))
# UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 21:
ordinal not in range(128) #
So I'm wondering if this is a known issue with Pymel in the Japanese version of
2013, and if there is some way for a user to fix it, possibly by patching or
upgrading their version of PyMel. We have a customer who is using a product of
ours that relies heavily on PyMel in the Japanese version of Maya 2013.
Thanks
Tagore Smith
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.