python提示UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xa1 in position 6: invalid start byte
用json解析字符串发现编码错误
In [5]: records = [json.loads(line) for line in open(path)]1
错误提示
UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xa1 in position 6: invalid start byte
解决办法,用Unicode,
转载
2015-08-24 10:13:32 ·
2247 阅读 ·
2 评论