cPickle.load says 'invalid signature'

The file is pickle saved on i386 and loaded on x86_64. It contains a numpy array (amoungst other things). On load it says: RuntimeError: invalid signature Is binary format not portable?

Wed, 18 May 2011 07:39:18 -0400, Neal Becker wrote:
The file is pickle saved on i386 and loaded on x86_64. It contains a numpy array (amoungst other things).
On load it says:
RuntimeError: invalid signature
There's no such message in Numpy source code, so the error does not come directly from Numpy. Did you try to isolate the problem a bit more by producing the pickle file without the array?

It's a wild guess, but try to save your pickle with 'wb' as argument of open, and protocol=-1. Then open it with 'rb'. It helped me fix some cross-platform issues in the past. -=- Olivier 2011/5/18 Neal Becker <ndbecker2@gmail.com>
The file is pickle saved on i386 and loaded on x86_64. It contains a numpy array (amoungst other things).
On load it says:
RuntimeError: invalid signature
Is binary format not portable?
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (3)
-
Neal Becker
-
Olivier Delalleau
-
Pauli Virtanen