- package: azure-ai-documentintelligence:
- version: 1.0.2:
- os: macOS Tahoe 26.5.2:
- Python Version 3.11.11:
Describe the bug
I am setting up a batch request to azure document intelligence using the async interface like the following and saving the continuation token.
batch_request = AnalyzeBatchDocumentsRequest(
azure_blob_source=azure_blob_source,
result_container_url=container_url_with_sas,
result_prefix=result_prefix,
overwrite_existing=True,
)
poller = await self._document_intelligence_client.begin_analyze_batch_documents("prebuilt-layout", batch_request, locale="en")
continuation_token = poller.continuation_token()
Then in a queue I poll the job using the previously saved continuation token and print out all the statuses.
poller = await self._document_intelligence_client.get_analyze_batch_result(continuation_token)
print(f"Poller done: {poller.done()}")
print(f"Poller status: {poller.status()}")
result: AnalyzeBatchResult = await poller.result()
print(f"Poller succeeded count: {result.succeeded_count}")
print(f"Poller failed count: {result.failed_count}")
print(f"Poller skipped count: {result.skipped_count}")
However even when the result is present, and therefore the analysis job is completed, the done() still returns False and status() still says InProgress.
Poller done: False
Poller status: InProgress
Poller succeeded count: 5
Poller failed count: 0
Poller skipped count: 0
To Reproduce
Steps to reproduce the behavior:
- Create a begin_analyze_batch_documents request
- Save the continuation token
- Run poller.done() and poller.status(), poller.done() will be false and poller.status() will be InProgress even after the images have finished transcribing. poller.result() will return the successful files even when the other two method claim it isn't complete.
Expected behavior
I expect to be able to kick off a batch process and poll it for being done and once it is complete then get the result rather than having to call the blocking result() method and waiting.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Describe the bug
I am setting up a batch request to azure document intelligence using the async interface like the following and saving the continuation token.
Then in a queue I poll the job using the previously saved continuation token and print out all the statuses.
However even when the result is present, and therefore the analysis job is completed, the done() still returns False and status() still says InProgress.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to be able to kick off a batch process and poll it for being done and once it is complete then get the result rather than having to call the blocking result() method and waiting.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.