Share via

Internal Server Error when using custom extraction model

Patrick 0 Reputation points
2023-12-04T09:57:54.1166667+00:00

I trained multiple custom extraction models of different kind and when I try to call one to analyse a test document I receive an InternalServerError. When I swap the model - input data remains the same - it works. I tested the model via browser and it works like a charm. So what is the problem here?

Unable to retrieve continuation token: cannot serialize '_io.BufferedReader' object
Traceback (most recent call last):
  File "C:\...\document_intelligence\venv\lib\site-packages\azure\core\polling\base_polling.py", line 757, in run
    self._poll()
  File "C:\...\document_intelligence\venv\lib\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 "C:\...\document_intelligence\main.py", line 32, in <module>
    results = poller.result()
  File "C:\...\document_intelligence\venv\lib\site-packages\azure\core\polling\_poller.py", line 251, in result
    self.wait(timeout)
  File "C:\...\document_intelligence\venv\lib\site-packages\azure\core\tracing\decorator.py", line 78, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "C:\...\document_intelligence\venv\lib\site-packages\azure\core\polling\_poller.py", line 270, in wait
    raise self._exception  # type: ignore
  File "C:\...\document_intelligence\venv\lib\site-packages\azure\core\polling\_poller.py", line 185, in _start
    self._polling_method.run()
  File "C:\...\document_intelligence\venv\lib\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.
Azure Document Intelligence in Foundry Tools

1 answer

Sort by: Most helpful
  1. Patrick 0 Reputation points
    2023-12-05T11:06:22.2033333+00:00

    After retraining the model with a few additional documents the error vanished. It appears to have been a hickup of some sort.

    Was this answer helpful?


Your answer

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