PaddlePaddle/PaddleOCR · warning · ResultParseError
Document parsing result item is missing result.layoutParsing
Error message
Document parsing result item is missing result.layoutParsingResults.
What it means
Raised as RequestTimeoutError from get_job_status in paddleocr/_api_client/_http.py:166 when the GET to fetch a single job's status exceeds the configured HTTP timeout. Status calls are normally fast, so a timeout here points to server overload or network degradation rather than payload size. The poll caller (sync/async poller) will surface this unless it retries internally.
Source
Thrown at api_sdk/typescript/src/client.ts:305
throw new ResultParseError("OCR result page is missing prunedResult.");
}
return {
prunedResult: item.prunedResult,
ocrImageUrl: typeof item.ocrImage === "string" ? item.ocrImage : undefined,
docPreprocessingImageUrl: typeof item.docPreprocessingImage === "string" ? item.docPreprocessingImage : undefined,
inputImageUrl: typeof item.inputImage === "string" ? item.inputImage : undefined,
raw: item,
};
});
});
return { jobId, pages, dataInfo };
}
private parseDocParsingResult(jobId: string, jsonlData: unknown[]): DocParsingResult {
const dataInfo: Record<string, unknown> = {};
const pages = jsonlData.flatMap((lineObj) => {
if (!isRecord(lineObj) || !isRecord(lineObj.result) || !Array.isArray(lineObj.result.layoutParsingResults)) {
throw new ResultParseError("Document parsing result item is missing result.layoutParsingResults.");
}
if (isRecord(lineObj.result.dataInfo)) {
Object.assign(dataInfo, lineObj.result.dataInfo);
}
return lineObj.result.layoutParsingResults.map((item) => {
if (!isRecord(item) || !isRecord(item.markdown) || typeof item.markdown.text !== "string") {
throw new ResultParseError("Document parsing result page is missing markdown.text.");
}
return {
markdownText: item.markdown.text,
markdownImages: isRecord(item.markdown.images) ? stringMap(item.markdown.images) : {},
outputImages: isRecord(item.outputImages) ? stringMap(item.outputImages) : {},
prunedResult: item.prunedResult,
inputImageUrl: typeof item.inputImage === "string" ? item.inputImage : undefined,
exports: isRecord(item.exports) ? item.exports : {},
markdown: item.markdown,
raw: item,
};View on GitHub (pinned to 2661c7c0ef)
Solutions
- Raise the client timeout (status calls still need headroom, e.g. 60s)
- Reduce polling frequency to lower pressure and avoid compounding latency
- Retry the status call — single missed polls are cheap and usually succeed
- Check the service status page for degraded latency
Example fix
# resilient polling
from paddleocr._api_client.errors import RequestTimeoutError
for _ in range(5):
try:
status = client.get_job_status(job_id)
break
except RequestTimeoutError:
continue Defensive patterns
Strategy: retry
Try / catch
from paddleocr._api_client.errors import RequestTimeoutError
for _ in range(3):
try:
status = client.get_job_status(job_id)
break
except RequestTimeoutError:
continue # status reads are idempotent Prevention
- Wrap status polls in a retry loop with backoff
- Leave timeout headroom even for 'fast' endpoints
- Space out poll intervals to avoid compounding server load
When it happens
Trigger: Polling client.get_job_status(job_id) while the API is slow to respond — server under heavy load, status endpoint latency spikes, or a very low client timeout.
Common situations: Tight polling loops during peak hours; timeout lowered for fast calls then reused globally; network congestion; shared rate-limited egress (NAT exhaustion).
Related errors
- Job ${job.jobId} is a ${job.task} job, not a ${expectedTask}
- OCR result item is missing result.ocrResults.
- Document parsing result page is missing markdown.text.
- Either fileUrl or filePath is required.
- OCR result page is missing prunedResult.
AI-assisted analysis of PaddlePaddle/PaddleOCR@2661c7c0ef (2026-08-14).
Data as JSON: /api/errors/1e0f2392677e8ad4.
Report an issue: GitHub.