问答详情
源自:2-6 spider文件的编写(1)

print(response.text)编码错误

UnicodeEncodeError: 'gbk' codec can't encode character '\xee' in position 22325: illegal multibyte sequence

不知道是哪个位置的编码,我尝试过print(response.text.decode('utf-8'))和print(response.text.encode('utf8').decode('utf-8'))都不行

windows 10

pycharm

提问者:慕侠7953185 2019-05-07 22:40

个回答

  • 慕侠7953185
    2019-05-07 22:54:46

    已解决