nlpinaction / learning-nlp

nlp in action
1.03k stars 823 forks source link

UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 4: illegal multibyte sequence #10

Open xjfl64 opened 5 years ago

xjfl64 commented 5 years ago

UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 4: illegal multibyte sequence

Hejp5665 commented 5 years ago

每个open函数中加入encoding='utf-8' , 比如:open(vocabFile, "w",encoding='utf-8')