I am trying to upload some catalogs for a music skill. I am using the ask_smapi_sdk installed from pip
upload_request = catalog_v1.create_content_upload_url_request.CreateContentUploadUrlRequest()
res = client.generate_catalog_upload_url_v1(catalog_id, upload_request)
upload_response = requests.put(res.presigned_upload_parts[0].url, data=json.dumps(cat))
req = upload.complete_upload_request.CompleteUploadRequest()
res = client.complete_catalog_upload_v0(catalog_id, upload_response.headers['eTag'], req, full_response=True)
When I run this code it gives me the very useful error ask_sdk_model_runtime.exceptions.ServiceException: Server cannot process the request due to a client error.
Am I doing something obvious wrong? How do I make it work?
Depending on the ASK SDK for python version used, I would recommend checking the ASK SMAPI API reference for create_content_upload_url_request as i understand on latest version it follows this format for your upload_request operation
Similarly for response (res)
Please refer to ASK SMAPI catalog upload reference for python for properly uploading music catalog using pythonhere
Hope this information helps.