The following code gives an error:
headers = {'Path': '00ab536d1c45d0e21f2726c70ca78a21_كلمة سمو.docx',
'IssueNo': '', 'IssueDate': '2020-01-27', 'IssueYear': '',
'CountryName': '', 'DocSource': '66',
'FileName': '00ab536d1c45d0e21f2726c70ca78a21_كلمة الأردن.docx',
'DocNumber': '', 'CreateDMSDoc': '1',
'apiKey': '4B30A7BB-05E8-4F7D-A195-093CFA578995'}
response = requests.post('http://localhost/FileUploadService/Api/UploadtStream', files=file, headers=headers)
The error is:
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 33-36: ordinal not in range(256)
How do I fix this?