2018年11月19日14:02:33
写爬虫时报错
UnicodeEncodeError: 'gbk' codec can't encode character '\u2764' in position 133: illegal multibyte sequence
Windows打开文件是以GBK方式打开的,对UTF-8字符不识别,修改文件打开方式后正常
txts =open('./contents','a',encoding='utf-8')
2018年11月19日14:02:33
写爬虫时报错
UnicodeEncodeError: 'gbk' codec can't encode character '\u2764' in position 133: illegal multibyte sequence
Windows打开文件是以GBK方式打开的,对UTF-8字符不识别,修改文件打开方式后正常
txts =open('./contents','a',encoding='utf-8')
本文标题:Python
本文链接:https://www.haomeiwen.com/subject/sxaofqtx.html
网友评论