UnpicklingError: NEWOBJ class argument isn't a type object

Chris Angelico rosuav at gmail.com
Mon Jul 8 01:57:30 EDT 2013


On Mon, Jul 8, 2013 at 3:27 PM, skunkwerk <skunkwerk at gmail.com> wrote:
>   I'm using a custom pickler that replaces any un-pickleable objects (such as sockets or files) with a string representation of them...
>
> If it pickles okay, why should it not be able to unpickle?  Any ideas?

Generally, the reason something won't pickle is because it won't be
able to be unpickled. So arbitrarily creating a string might allow the
pickle operation to continue, but might well prevent unpickling still.
I don't know, you'd have to play around with it.

ChrisA



More information about the Python-list mailing list