// Error: line 0: (kInvalidParameter): No element at given index
# Traceback (most recent call last):
pymel/core/**init**.py", line 105, in addPluginPyNodes
# _api.MEventMessage.removeCallback( id )
# RuntimeError: (kInvalidParameter): No element at given index //
// Warning: line 0: Failed to call script callback //
PyMel tries to remove a callback but the callback ID does not exist anymore. This happens when I
import pymel.core as pm
load a scene which requires a plugin which loads several nodes
open a new file (even when just creating an empty scene)
It does not happen when I load the plugin manually before loading the file.
This is the PyMel code:
def addPluginPyNodes(*args):
try:
id = _pluginData[pluginName]['callbackId']
if id is not None:
_api.MEventMessage.removeCallback( id )
if hasattr(id, 'disown'):
id.disown()
I added this line to fix this issue:
_pluginData[pluginName]['callbackId'] = None
I don't really understand why the addPluginPyNodes is called when the callback is not there anymore...
Maya version: 2011.5x64
OS: Red Hat 5.3, 64bits
PyMel: 1.0.3
From kjelle.a...@gmail.com on August 23, 2011 07:04:13
I get the following error:
PyMel tries to remove a callback but the callback ID does not exist anymore. This happens when I
It does not happen when I load the plugin manually before loading the file.
This is the PyMel code:
I added this line to fix this issue:
_pluginData[pluginName]['callbackId'] = None
I don't really understand why the addPluginPyNodes is called when the callback is not there anymore...
Maya version: 2011.5x64 OS: Red Hat 5.3, 64bits PyMel: 1.0.3
Original issue: http://code.google.com/p/pymel/issues/detail?id=255