Re: can't pickle instancemethod objects

2006-07-09 Thread Jim Lewis
> Here's a thought: comment out every attribute in your class, and then try > pickling it. If it succeeds, uncomment just *one* attribute, and try > pickling again. Repeat until pickling fails. Was trying to avoid that but you motivated me to do so and now I found the probem. In a utility routine

Re: can't pickle instancemethod objects

2006-07-09 Thread Steven D'Aprano
On Sun, 09 Jul 2006 08:39:29 -0700, Jim Lewis wrote: >> I'd suggest that "pop" could be your culprit. ...What is pop? A function or >> an instance method? > > Neither. pop is an instance of a class, like: > class X: >... > pop = X () > > pop surely is the culprit but it has arrays of object

Re: can't pickle instancemethod objects

2006-07-09 Thread Jim Lewis
> I'd suggest that "pop" could be your culprit. ...What is pop? A function or > an instance method? Neither. pop is an instance of a class, like: class X: ... pop = X () pop surely is the culprit but it has arrays of objects, etc., and I don't know what to look for. -- http://mail.python.or

Re: can't pickle instancemethod objects

2006-07-09 Thread Steven D'Aprano
On Sun, 09 Jul 2006 07:06:25 -0700, Jim Lewis wrote: >> How about you post the complete stack trace of the exception? > > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\program files\python\lib\lib-tk\Tkinter.py", line 1345, in > __call__ > return self.func(*a

Re: can't pickle instancemethod objects

2006-07-09 Thread Jim Lewis
> How about you post the complete stack trace of the exception? Exception in Tkinter callback Traceback (most recent call last): File "C:\program files\python\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) File "C:\Public\world.py", line 1832, in BtnGo DoBtnGo()

Re: can't pickle instancemethod objects

2006-07-09 Thread Steven D'Aprano
On Sun, 09 Jul 2006 05:45:27 -0700, Jim Lewis wrote: > Pickling an instance of a class, gives "can't pickle instancemethod > objects". What does this mean? It means you can't pickle instance methods. > How do I find the class method creating the problem? How about you post the complete stack t