我已经通过python 2.7转储了一个变量,如下所示:
import cPickle as pickle
f1 = open('./data.pickle','wb')
pickle.dump(datasets,f1)
f1.close()
并且,加载的方式如下,但使用python 2.6.6:
f1=open('./data.pickle' ,'rb')
dataset=pickle.load(f1)
f1.close()
想知道为什么我收到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: insecure string pickle