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).
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: