使用deap预处理文件进行情感分析

时间:2018-06-17 08:27:40

标签: python analysis

当我尝试unpickle preprocessed deap数据文件时,会发生以下错误:

File "D:/EEG_emotion_clasification-bd30dab4660735e8bb9c566f97b98b22ec8073f2/fitur_extraction/fft.py", line 210, in <module>
    dataset=pickle.load(open('D:\deap\data_preprocessed_python\s0'+str(i)+'.dat','rb'))

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

我该怎么办?

1 个答案:

答案 0 :(得分:0)

你可以这样做:

with open(dat_file, 'rb') as f:
    x = cPickle.load(f, encoding='latin1')