Hello,

I am getting the below error when using mechanize to submit a webform.
>>> Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__
return self.func(*args)
File "C:\Python26\lib\idlelib\MultiCall.py", line 159, in handler
doafterhandler.pop()()
File "C:\Python26\lib\idlelib\MultiCall.py", line 206, in <lambda>
doit = lambda: self.bindedfuncs[triplet[2]][triplet[0]].remove(func)
ValueError: list.remove(x): x not in list

Anybody has any idea what this is??

That error has nothing to do with the mechanize lib

It simply means what ever you are trying to remove from the list (func) is not in the list, so it can't remove it.

Try putting

print self.bindedfuncs[triplet[2]][triplet[0]], func

So you can see what the contents are

Hi gorbulas,
I am not sure why but i never got that error again. Any idea why would this happen?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.