Nils Diefenbach
Nils Diefenbach

Reputation: 43

Fixing PyMel import error "pop from empty list"?

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

Upvotes: 0

Views: 1058

Answers (1)

Nils Diefenbach
Nils Diefenbach

Reputation: 43

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.

Upvotes: 1

Related Questions