Re: cPickle problems

2006-11-18 Thread Paul McGuire
that defines __slots__ without defining __getstate__ > cannot be pickled > > I think I need to talk to the author of PyParsing about this one... > Thanks for your help! > > > Jeff Jeff - Sorry not to reply sooner, I have been out of town with limited access to c.l.py. Also

Re: cPickle problems

2006-11-16 Thread Klaas
Jeff Poole wrote: > Good idea. Well, I did that, and I found out that the object causing > problems is a ParseResults object (a class from PyParsing) and that the > __getstate__ member is in fact an empty string (''). I'm not sure > where this leaves me... The PyParsing code clearly never crea

Re: cPickle problems

2006-11-16 Thread Jeff Poole
Good idea. Well, I did that, and I found out that the object causing problems is a ParseResults object (a class from PyParsing) and that the __getstate__ member is in fact an empty string (''). I'm not sure where this leaves me... The PyParsing code clearly never creates such a member and my cod

Re: cPickle problems

2006-11-16 Thread Gabriel Genellina
At Thursday 16/11/2006 21:48, Jeff Poole wrote: File "/usr/lib/python2.4/pickle.py", line 313, in save rv = reduce(self.proto) File "/usr/lib/python2.4/copy_reg.py", line 83, in _reduce_ex dict = getstate() TypeError: 'str' object is not callable Someway, self.__getstate__ is a st

Re: cPickle problems

2006-11-16 Thread Jeff Poole
To clutter this up with yet another message, this is what happens if I use pickle instead of cPickle. Same error, but it has more of a stack trace so someone more advanced than myself might be able to pick out what is going amiss. Traceback (most recent call last): File "./generateTools.py", li

Re: cPickle problems

2006-11-16 Thread Jeff Poole
Oh, and I suppose I should provide some version information: $ python Python 2.4.3 (#1, May 18 2006, 07:40:45) [GCC 3.3.3 (cygwin special)] on cygwin Jeff Poole wrote: > This is going to be a pretty vague message because it involves a large > block of code I'd rather avoid posting. Basically,

cPickle problems

2006-11-16 Thread Jeff Poole
This is going to be a pretty vague message because it involves a large block of code I'd rather avoid posting. Basically, I've been pickling a dictionary of instances of a class I've created (which contains references to other instances of other classes). At some point in the last few weeks, pick