Unpickle error -- "object has no attribute ...."

Peter Otten __peter__ at web.de
Tue Aug 30 16:21:27 CEST 2011

luvspython wrote:

> THANK YOU!  Special-casing "__dict__" did the trick.  Not sure I'd
> have ever figured that out, which leads to a different question:
> I can figure out most things, though perhaps very slowly and
> painfully, if I can trace through code.  I use WingIDE (love it), but
> the execution
> of the C code is of course hidden, which helped stymie on this
> problem.  Is there another tool y'all might use and you can suggest
> that deals with that problem and would have helped me with this case?
> Or is one's ability to figure out this sort of problem largely
> dependent on really understanding the system's internals?

I'm with Chris here, I make do with some understanding of Python and a 
generous amount of print statements. My other secret weapon is that I try to 
keep the complexity of my code low ;)

As Python is yet another C program you can of course step through its code 
(debug build) with an appropriate debugger, but I've never done that. My 
guess is that you wouldn't have seen the forest for the trees.

More information about the Python-list mailing list