Strange KeyError using cPickle

Rune Strand rune.strand at gmail.com
Wed Jun 1 22:05:14 EDT 2005


[Tim Peters]
> What is "XWwz"?  Assuming it's a bizarre typo for "open", change the
> 'w' there to 'wb'.  Pickles are binary data, and files holding pickles
> must be opened in binary mode, especially since:
>
> > ...
> > (on WinXP, CPython 2.4.1)

Thanks Tim. The bizarre 'typo' appears to be caused by ad-blocking
software confusing python code with javascript (i think).

I had the feeling this was a red facer.

Setting the protocol to 0 (text) also  make it work.




More information about the Python-list mailing list