ValueError: insecure string pickle

后端 未结 10 1521
轻奢々
轻奢々 2020-12-03 04:00

When I am trying to load something I dumped using cPickle, I get the error message:

ValueError: insecure string pickle

Both the dumping and

10条回答
  •  伪装坚强ぢ
    2020-12-03 05:00

    Check this thread. Peter Otten says:

    A corrupted pickle. The error is raised if a string in the dump does not both start and end with " or '.

    and shows a simple way to reproduce such "corruption". Steve Holden, in the follow-up post, suggests another way to cause the problem would be to mismatch 'rb' and 'wb' (but in Python 2 and on Linux that particular mistake should pass unnoticed).

提交回复
热议问题