[Zope-DB] Newbie DBAptapter makie want ...

Gerhard Häring gerhard@bigfoot.de
Mon, 24 Sep 2001 07:34:08 +0200


On Mon, Sep 24, 2001 at 07:21:00AM +0200, Gerhard Häring wrote:
> [...] Now I get a very obscure error in ZODB. But only when the first column
> is an integer.
> 
> In case this rings any bells: an UnpickleableError is raised. When I try to
> find out which type cannot be pickled, dont't laugh!, I get: "Could not
> pickle: UnpickleableError"

Just to clarify where I got this from.  This is the code to test for what could
not be pickled:

In ZODB/Connection.py; class Connection; method commit, i replaced dump(state)
with:

	    # HACK
	    try:
		dump(state)
	    except UnpickleableError, args:
		f = open("/tmp/gh", "w")
		f.write("Could not pickle: " + args.__class__.__name__)
		f.close()
		raise UnpickleableError, args
	    # /HACK

Hmm. I guess there must be a better way to debug ZOPE than this hack. Am I
missing something obvious or does it really try to pickle the
"UnpickleableError" exception?

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))