PaddlePaddle/PaddleOCR · error · ResponseFormatError
Batch extractResult items must be objects.
Error message
Batch extractResult items must be objects.
What it means
Error "Batch extractResult items must be objects." thrown in PaddlePaddle/PaddleOCR.
Source
Thrown at paddleocr/_api_client/_core.py:204
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
- Check the batch status response; every item in extractResult must be a JSON object describing a job.
- Capture the raw response and report it if the server returned scalar or null items.
- Retry the status request; a transient server error can produce a malformed payload.
Example fix
for item in result:
if not isinstance(item, dict):
print(item) # find the malformed entry When it happens
Trigger: Raised by parse_batch_status() when an item in the batch extractResult list is not a JSON object.
Common situations: Items in the batch 'extractResult' list were not objects. Indicates a malformed server payload. Capture the raw response and report or retry.
AI-assisted analysis of PaddlePaddle/PaddleOCR@2661c7c0ef (2026-08-14).
Data as JSON: /api/errors/1e2f582c34398df9.
Report an issue: GitHub.