pickle 在python2 to python3 编码出现错误

 pickle.load(file)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xf5 in position 2: ordinal not in range(128)

修改 编码格式 

encoding='latin1'

 

with open("../model/left_gmm.pkl", 'rb') as file:
    left_gmm = pickle.load(file)

  

posted @ 2019-04-01 14:42  luofeel  阅读(803)  评论(0编辑  收藏  举报