我目前正在用Python编写REST API Data Grabber,它应该将一些JSON数据保存到.csv文件中。它写了10.000行数据,但有时程序停止并返回此错误
id = models.AutoField(primary_key=True)
有人可以帮助我吗?
修改 产生错误的JSON包含:
File "C:\***\PycharmProjects\REST_API_Data_Grabber\lib\Export.py", line 156, in writeClientsTableFromIds
csvWriter.writerow([client.get('Id', emptyReplace), function, zipCode])
File "C:\***\Python\Python35\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\x81' in position 23: character maps to <undefined>
我需要更换它,但我无法取而代之。