调试bug错误

UnicodeEncodeError: 'utf-8' codec can't encode character '\udcd5' in position 2387: surrogates not allowed

运行python项目时遇到这个问题,原来是因为win10系统后缀给省略了,所以文件名和程序里不一致。

程序里写的train.tsv,文件名显示的也是train.tsv,但是打开属性一看,全名其实是train.tsv.txt。win10把后缀省略掉真是太不友好了。改掉文件名即可。

猜你喜欢

转载自blog.csdn.net/sinat_30106697/article/details/86571434