PaddlePaddle/PaddleOCR · error · ResponseFormatError
Batch response data must contain list 'extractResult'.
Error message
Batch response data must contain list 'extractResult'.
What it means
Error "Batch response data must contain list 'extractResult'." thrown in PaddlePaddle/PaddleOCR.
Source
Thrown at paddleocr/_api_client/_core.py:198
return job_id
def validate_result_json_url(data: dict) -> str:
result_url = data.get("resultUrl")
if not isinstance(result_url, dict):
raise ResponseFormatError("Done job response must contain object 'resultUrl'.")
json_url = result_url.get("jsonUrl")
if not isinstance(json_url, str) or not json_url:
raise ResponseFormatError(
"Done job response resultUrl must contain non-empty string 'jsonUrl'."
)
return json_url
def parse_batch_status(batch_id: str, data: dict) -> BatchStatus:
result = data.get("extractResult")
if not isinstance(result, list):
raise ResponseFormatError(
"Batch response data must contain list 'extractResult'."
)
jobs = []
for item in result:
if not isinstance(item, dict):
raise ResponseFormatError("Batch extractResult items must be objects.")
job_id = item.get("jobId")
if not isinstance(job_id, str) or not job_id:
raise ResponseFormatError(
"Batch extractResult items must contain non-empty string 'jobId'."
)
jobs.append(job_status_from_data(job_id, item))
return BatchStatus(batch_id=batch_id, jobs=jobs)
View on GitHub (pinned to 2661c7c0ef)
Solutions
- Verify you are querying batch status with a valid batch_id; the response data must contain a list 'extractResult'.
- Check the raw response JSON to confirm the server returned the expected batch status schema.
- Confirm the API version matches the SDK; schema changes can rename or remove extractResult.
Example fix
result = data.get("extractResult")
if not isinstance(result, list):
print(data) # inspect actual batch status payload When it happens
Trigger: Raised by parse_batch_status() when the batch status response data lacks a list field 'extractResult'.
Common situations: A batch response was missing the 'extractResult' list. Occurs when querying a batch before it finishes or with an invalid batch id. Wait for completion and verify the batch identifier.
AI-assisted analysis of PaddlePaddle/PaddleOCR@2661c7c0ef (2026-08-14).
Data as JSON: /api/errors/3b241c74a860598e.
Report an issue: GitHub.