Python Microsoft Word to MarkDown Conversion throws AmazonS3 Storage exception

I found error in the below for the code attached…

  • I set for my google drive storage.

Error msg:

groupdocs_conversion_cloud.api_exception.ApiException: (500)
Message: AmazonS3 Storage exception: The specified key does not exist. Bucket ‘groupdocs.cloud-filestorage-prod’, FilePath

code:
api = groupdocs_conversion_cloud.ConvertApi.from_keys(‘API ID’, ‘API Secret key’ )

변환 설정

settings = groupdocs_conversion_cloud.ConvertSettings()

settings.format = “md”

settings.storage_name = “DOCX to MD”

settings.output_path = “ConvertedFiles”

파일 다운로드 함수 정의

def convert_and_download(input_filename):

settings.file_path = input_filename



data = api.convert_document_download(request)

return data

현재 폴더 내의 .docx 파일들을 찾아서 변환 및 다운로드

for filename in os.listdir(’.’):

if filename.endswith('.docx'):

    request = groupdocs_conversion_cloud.ConvertDocumentRequest(settings)

   

    response = api.convert_document(request)

for filename in os.listdir(’.’):

if filename.endswith('.docx'):

    settings.file_path = filename

    request = groupdocs_conversion_cloud.ConvertDocumentRequest(settings)

    response = api.convert_document(request)

    print(f"Converted {filename} to {settings.format}")

can you help how to resolve?

@workwave

Please double check that you are passing the correct storage name in the API call and that the referenced file exists in the storage. Hopefully, it will resolve the issue. Otherwise, please share your complete code along with your credentials via a private message for investigation.