0

Im using PyMel to write up some tools, but as of yesterday my PyMel modules won't source, due to an error that I get during import:

import pymel.core as pm

# pymel.core : Updating pymel with pre-loaded plugins: OpenEXRLoader, DirectConnect, mayaHIK, ikSpringSolver, Mayatomr, decomposeMatrix, tiffFloatReader, VectorRender, studioImport, mayaCharacterization, rotateHelper, MayaCryExport22012-x64, Substance, MayaMuscle, fbxmaya, ik2Bsolver # 
#  pop from empty list
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
#   File "C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\pymel-1.0.0-py2.6.egg\pymel\core\__init__.py", line 250, in <module>
#     _installCallbacks()
#   File "C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\pymel-1.0.0-py2.6.egg\pymel\core\__init__.py", line 248, in _installCallbacks
#     _pluginLoaded( plugin )
#   File "C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\pymel-1.0.0-py2.6.egg\pymel\core\__init__.py", line 79, in _pluginLoaded
#     _factories.cmdlist[funcName] = _factories.cmdcache.getCmdInfoBasic( funcName )
#   File "C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\pymel-1.0.0-py2.6.egg\pymel\internal\cmdcache.py", line 212, in getCmdInfoBasic
#     synopsis = lines.pop(0)
# IndexError: pop from empty list # 

any ideas on how to fix this? I downloaded the newest version of PyMel, checked the install guide if I left anything out (i used method 2), but i still have no idea what the problem is.

Thx, Nils

Reto Aebersold
  • 16,306
  • 5
  • 55
  • 74
  • I checked the paths again - it may be related to the path saying "pymel-1.0.0-py2.6.egg" - for one thing I have python 2.7 installed, and my pyMel version is 1.0.3. I hope this information is of use :/ – Nils Diefenbach May 09 '12 at 13:18
  • It's not an import problem, since pymel is being imported, but rather an internal problem (function getCmdInfoBasic). – rubik May 09 '12 at 14:41
  • Alright, so maya's being the problem? aint that a surprise. :D Do you have any Idea on how to fix this? – Nils Diefenbach May 09 '12 at 17:37
  • The problem is in `pymel.internal.cmdcache.py`, line 205: `lines = cmds.help( command ).split('\n')`. You get your error when `lines` is empty. That's due to `cmds`, which is `maya.cmds`. I did not find `maya` source, so my research stop here. – rubik May 09 '12 at 17:46

1 Answers1

1

Alright, so after trying to re-install most of my programs I simply fixed the cdmcashe.py from where the error comes from - I ddnt originally want to do this because I wasnt sure what I might break, but after over 2 weeks of trying things out I just went for broke:

If anyone else has this problem, all u need to do is open your cmdcache.py and add an if test to line 212

    if lines:

That'll just fix it. yeah. simple as that. Imagine the head->desking session I had after doing that.