Closed priyanksonis closed 6 years ago
Hi,
The code was created for Python 2, and trying to load the model on Python 3 will give you this error. If you want to use Python 3, you can load it as follows:
with open('signet.pkl', 'rb') as f:
model_params = cPickle.load(f, encoding='latin1')
Thank you sir
Sir, I tried to read "signet.pkl" file in python 3.6 but I am getting error:
code:
from six.moves import cPickle
with open('signet.pkl', 'rb') as f:
model_params = cPickle.load(f)
error:
Traceback (most recent call last):
File "<ipython-input-39-0593160b4786>", line 3, in <module>
model_params = cPickle.load(f)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
I tried with open('signet.pkl', 'rb').read().decode('utf8') but its not working.