I'm currently writing a REST API Data Grabber in Python, which should save some JSON data into a .csv file. It's writing 10.000 of lines of data, but sometimes the program stops and returns this Error
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>
Could anyone help me, please?
EDIT: the JSON which produces the error contains:
"Function": "Blumenladen, Gesch?ftsf\u0081hrer",
"Group": "",
"GroupId": 493,
and I need to replace it, but I can't make it.