COMMON_INTERNAL_SERVER_ERROR
Hello,
I am getting error one send post request via python( ) to Zoho analytics, the error is COMMON_INTERNAL_SERVER_ERROR.
how to fix it?
***I don't want to use the SDK package**
error:
{"status":"failure","summary":"COMMON_INTERNAL_SERVER_ERROR","data":{"errorCode":7005,"errorMessage":"Sorry, an unexpected error occurred when performing this operation. The error has been logged and will be looked into.\n\nIt would be of great help if you could provide us with additional information using the ''Feedback'' link."}}
code:
api_url = 'https://analyticsapi.zoho.com/restapi/v2/workspaces/xxxxxx/views/xxxxxxx/data'
print(api_url)
headers = {
"Authorization": f"Zoho-oauthtoken {access_token}"
}
csv_file_path = '/Users/xxxxxx/Downloads/data.csv'
with open(csv_file_path, 'rb') as csv_file:
csv_bytes = csv_file.read()
files = {'file': ('data.csv', csv_bytes, 'text/csv')}
data = {"importType": "updateadd",
"fileType": "csv",
"autoIdentify": "true"
}
response = requests.post(api_url, headers=headers, files=files, data=data)
print(response.text)