PaddlePaddle/PaddleOCR · warning · ResultParseError
Document parsing result page is missing markdown.text.
Error message
Document parsing result page is missing markdown.text.
What it means
Raised as NetworkError from get_job_status in paddleocr/_api_client/_http.py:168 when the GET for a job's status fails at the connection layer (DNS, TLS, reset, refused). The job keeps running server-side; only the observation request failed. Transient by nature — retrying the same status call is safe and idempotent.
Source
Thrown at api_sdk/typescript/src/client.ts:312
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,
};
});
});
return { jobId, pages, dataInfo };
}
private resolveJob(job: Job | string, expectedTask: Job["task"]): Job {
if (typeof job === "string") {View on GitHub (pinned to 2661c7c0ef)
Solutions
- Retry the status call with a small backoff — read-only and idempotent
- If keepalive resets recur between long poll intervals, retry transparently or use a fresh session
- Verify general connectivity if failures persist
- Keep the jobId persisted so polling can resume after process restarts
Example fix
# backoff retry for idempotent status reads
import time
from paddleocr._api_client.errors import NetworkError
for delay in (1, 2, 4, 8):
try:
status = client.get_job_status(job_id)
break
except NetworkError:
time.sleep(delay)
else:
raise Defensive patterns
Strategy: retry
Try / catch
from paddleocr._api_client.errors import NetworkError
for delay in (1, 2, 4, 8):
try:
status = client.get_job_status(job_id)
return
except NetworkError:
time.sleep(delay)
raise Prevention
- Retry idempotent status reads with backoff instead of failing the whole job flow
- Persist jobId so polling resumes after connectivity recovers
- Expect keepalive resets on long poll sessions and handle them
When it happens
Trigger: Polling get_job_status during a network blip, VPN reconnect, DNS hiccup, or when a proxy drops idle keepalive connections between polls.
Common situations: Long-running jobs polled for minutes over unreliable networks; laptop sleep/resume mid-poll; container DNS flakiness; proxies closing idle sessions.
Related errors
- Either fileUrl or filePath is required.
- OCR result page is missing prunedResult.
- Document parsing result item is missing result.layoutParsing
- Job ${job.jobId} is a ${job.task} job, not a ${expectedTask}
- Model ${model} is not an OCR model.
AI-assisted analysis of PaddlePaddle/PaddleOCR@2661c7c0ef (2026-08-14).
Data as JSON: /api/errors/b5459863596f810b.
Report an issue: GitHub.