Pickle translation
Skip Montanaro
skip at pobox.com
Wed Jul 11 17:38:22 EDT 2001
William> When I start the daemon that does all the work with
William> python1.5.2, it loads the pickle fine. When I try to start it
William> with python2.1 I get this:
William> Traceback (most recent call last):
William> File "bin/momd", line 83, in ?
William> kserv = load(f)
William> ValueError: invalid \x escape
Interpretation of \x escapes was tightened up in 2.0 I believe. In versions
earlier than 2.0 '\xyy' is interpreted as the four-character sequence:
\ x y y
In 2.0 and 2.1 the ValueError you see is raised because "yy" can't be
interpreted as a hex number.
I'm not sure what the solution is. Someone with more pickle/string/
internals knowledge will probably have some ideas.
--
Skip Montanaro (skip at pobox.com)
(847)971-7098
More information about the Python-list
mailing list