Hi,
I am encountering an issue while using the begin_analyze_document
method with the Prebuilt.Invoice model and API version 2023-10-31. The error occurs when I call poller.result()
, and the details are as follows:
poller.result()
Traceback (most recent call last):
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/base_polling.py", line 757, in run
self._poll()
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/base_polling.py", line 789, in _poll
raise OperationFailed("Operation failed or canceled")
azure.core.polling.base_polling.OperationFailed: Operation failed or canceled
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/_poller.py", line 251, in result
self.wait(timeout)
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/_poller.py", line 270, in wait
raise self._exception # type: ignore
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/app/infraestructure/adapters/adapterextractor.py", line 158, in extraerMetadatos3
invoice: AnalyzeResult = poller.result()
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/_poller.py", line 251, in result
self.wait(timeout)
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/_poller.py", line 270, in wait
raise self._exception # type: ignore
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/_poller.py", line 185, in _start
self._polling_method.run()
File "/home/ivanh/Proyectos/gpm_extraccion_20240418/env3.8/lib/python3.8/site-packages/azure/core/polling/base_polling.py", line 772, in run
raise HttpResponseError(response=self._pipeline_response.http_response, error=err) from err
azure.core.exceptions.HttpResponseError: (InternalServerError) An unexpected error occurred.
Code: InternalServerError
Message: An unexpected error occurred.
Exception Details: (InternalServerError) An unexpected error occurred.
Code: InternalServerError
Message: An unexpected error occurred.
The operation fails and throws an InternalServerError
with the message "An unexpected error occurred." This exception appears to be raised during the polling phase after initiating the document analysis.
Notably, when I process the same document through Document Intelligence Studio, it returns the data correctly without any issues. This suggests that the document itself is not the problem.
I would appreciate your assistance in resolving this issue. Please let me know if you require any additional information or logs.
Thank you for your support.
Best regards,
Ivan Hernanz