1.python 解码错误提示的位置
UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 840: illegal multibyte sequence
解决:#!/usr/bin/python3#
-*- coding:utf8 -*-importcodecs
然后指定解码方式:
open("filename",'w',encoding="utf8")
1.python 解码错误提示的位置
UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 840: illegal multibyte sequence
解决:#!/usr/bin/python3#
-*- coding:utf8 -*-importcodecs
然后指定解码方式:
open("filename",'w',encoding="utf8")
本文标题:2018-05-29
本文链接:https://www.haomeiwen.com/subject/szxzjftx.html
网友评论