Having trouble with DocumentAnalysisClient().begin_analyze_document() function

Ho, Keith D 120 Reputation points
2024-04-08T20:05:52.96+00:00

Hi I'm currently trying to run this code to run the document analysis tool on my pptx file. I've ran this code previously and it worked before but now I'm running into an error saying:
"Message: Invalid request. Inner error: { "code": "InvalidContent", "message": "The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats." }"
I've double checked that the file is not corrupt and I even recreated the pptx file to check but I still get the same error.

I've taken this code from here but it doesn't seem to work for me, https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_general_documents.py.

Screenshot 2024-04-08 at 1.05.12 PM

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,672 questions
{count} votes

Accepted answer
  1. VasaviLankipalle-MSFT 17,281 Reputation points
    2024-04-08T23:30:12.7833333+00:00

    Hello @Ho, Keith D , I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue: "Message: Invalid request. Inner error: { "code": "InvalidContent", "message": "The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats." }"

    Solution: Upgrading the Python azure-ai-formrecognizer package to version 3.3.2 resolved.

    Additionally, please refer to the table that explains the support of the input requirements.

    User's image

    Make sure you use the right model and the API version that support this PPTX document.

    If you have any other questions or are still running into more issues, please let me know. Thank you again for your time and patience throughout this issue.

    Regards,
    Vasavi

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.