A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/062828.html below:

[Python-Dev] Pickling problems are hard to debug

[Python-Dev] Pickling problems are hard to debug [Python-Dev] Pickling problems are hard to debugGreg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 26 03:13:22 CEST 2006
There seems to be a need for better diagnostics
when pickle encounters something that can't be
pickled.

Recently when attempting to pickle a rather
large and complicated data structure, I got
the following incomprehensible message:

   cPickle.PicklingError: args[0]
     from __newobj__ args has the wrong class

Trying again with protocol 1 instead of 2,
I get

   TypeError: can't pickle function objects

which I'm *guessing* is because somewhere I've
tried to pickle a nested function or a bound
method. But it still doesn't give me any idea
*which* function I tried to pickle or where
abouts it turns up in the data structure.

Anyone have any ideas how the situation could
be improved? At the very least, it could
include some info about the type and identity
of the offending object.

Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4