How to feed document url to azure form recognizer api in python?
Anvesh Muttavarapu
0
Reputation points
I used from DocumentAnalysisClient in azure.ai.formrecognizer. It has a function called "begin_analyze_document_from_url" (ref: https://learn.microsoft.com/en-us/python/api/overview/azure/ai-formrecognizer-readme?view=azure-python) . this function always throws error for any document url.
Code:
poller = document_analysis_client.begin_analyze_document_from_url(model_id="prebuilt-read", document_url=form_url)
result = poller.result()
Below is the error. Is this a known issue. please let me know how to resolve this.
HttpResponseError: (InvalidRequest) Invalid request.
Code: InvalidRequest
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."
}
Sign in to answer