I'm trying to import pymel from the script editor in Maya and since this morning it doesn't work. I've tried to do a clean uninstall for all Autodesk products and then re-install Maya again but it didn't solve the issue. When I'm trying to import pymel this is what I get:
import pymel.core as pm
# pymel.core : Updating pymel with pre-loaded plugins: svgFileTranslator, invertShape, mayaHIK, GamePipeline, curveWarp, tiffFloatReader, MASH, poseInterpolator, bifrostvisplugin, ATFPlugin, hairPhysicalShader, cacheEvaluator, ikSpringSolver, ik2Bsolver, xgenToolkit, AbcExport, retargeterNodes, gameFbxExporter, VectorRender, OpenEXRLoader, lookdevKit, Unfold3D, Type, mayaCharacterization, Boss, mtoa, bifrostGraph, meshReorder, modelingToolkit, MayaMuscle, rotateHelper, matrixNodes, bifmeshio, AbcImport, autoLoader, deformerEvaluator, sceneAssembly, gpuCache, OneClick, shaderFXPlugin, objExport, bifrostshellnode, renderSetup, GPUBuiltInDeformer, ArubaTessellator, mayaVnnPlugin, quatNodes, fbxmaya #
# Error: AssertionError: file C:\Program Files\Autodesk\Maya2020\Python\lib\site-packages\pymel\internal\factories.py line 3099: ('AiSky', <class 'maya.OpenMaya.MFnDagNode'>, <class 'maya.OpenMaya.MFnDependencyNode'>) #
And when I try to import it again I'm getting this:
import pymel.core as pm
# Error: NameError: file C:\Program Files\Autodesk\Maya2020\Python\lib\site-packages\pymel\core\__init__.py line 77: name 'windows' is not defined #
I'm working with Maya for years and it's the first time I'm having this issue. I tried everything I could think of. Re-installing Maya, restart maya and restart the computer.
I'm working with Maya 2020.4 on Windows 10.
Any ideas what could cause that? Any help would be appreciated!
Thanks! :)
I am afraid this is connected to newer version of MtoA (5.1.3). That doesn't work with pymel as that is trying to wrap all nodes from arnold and fails on
aiSky. If I read the code correctly it is becauseaiSkydefines different classes as its parent - there is assert in PyMel code checking for that. And because this assert is triggered during PyMel initialisation, it will effectively break it. That MtoA version should work ok in newer versions of Maya.