Jeremy writes:
I found the following patch helpful in tracking down a bug in some code. I had appended time, the module, instead of time.time(). Not sure if it is generally true that printing the repr of the object is good, but I expect that most unpicklable things will have fairly information and concise reprs (like files or sockets or modules).
This commit is contained in:
parent
c4eb6a6afd
commit
08a92cb568
|
@ -157,7 +157,8 @@ class Pickler:
|
|||
reduce = object.__reduce__
|
||||
except AttributeError:
|
||||
raise PicklingError, \
|
||||
"can't pickle %s objects" % `t.__name__`
|
||||
"can't pickle %s object: %s" % (`t.__name__`,
|
||||
`object`)
|
||||
else:
|
||||
tup = reduce()
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue