{"record":{"id":"4c9731804bb71fc4","repo":"PaddlePaddle/PaddleOCR","slug":"done-job-response-must-contain-object-resulturl","errorCode":null,"errorMessage":"Done job response must contain object 'resultUrl'.","messagePattern":"Done job response must contain object 'resultUrl'\\.","errorType":"exception","errorClass":"ResponseFormatError","httpStatus":null,"severity":"error","filePath":"paddleocr/_api_client/_core.py","lineNumber":186,"sourceCode":"    data = payload.get(\"data\")\n    if not isinstance(data, dict):\n        raise ResponseFormatError(\"Response JSON must contain object field 'data'.\")\n    return data\n\n\ndef extract_job_id(data: dict) -> str:\n    job_id = data.get(\"jobId\")\n    if not isinstance(job_id, str) or not job_id:\n        raise ResponseFormatError(\n            \"Response data must contain non-empty string 'jobId'.\"\n        )\n    return job_id\n\n\ndef validate_result_json_url(data: dict) -> str:\n    result_url = data.get(\"resultUrl\")\n    if not isinstance(result_url, dict):\n        raise ResponseFormatError(\"Done job response must contain object 'resultUrl'.\")\n    json_url = result_url.get(\"jsonUrl\")\n    if not isinstance(json_url, str) or not json_url:\n        raise ResponseFormatError(\n            \"Done job response resultUrl must contain non-empty string 'jsonUrl'.\"\n        )\n    return json_url\n\n\ndef parse_batch_status(batch_id: str, data: dict) -> BatchStatus:\n    result = data.get(\"extractResult\")\n    if not isinstance(result, list):\n        raise ResponseFormatError(\n            \"Batch response data must contain list 'extractResult'.\"\n        )\n    jobs = []\n    for item in result:\n        if not isinstance(item, dict):\n            raise ResponseFormatError(\"Batch extractResult items must be objects.\")","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/PaddlePaddle/PaddleOCR/blob/2661c7c0ef5c613e8f93c6e93b2e052399f0f854/paddleocr/_api_client/_core.py#L168-L204","documentation":"Error \"Done job response must contain object 'resultUrl'.\" thrown in PaddlePaddle/PaddleOCR.","triggerScenarios":"Raised by validate_result_json_url() when a done-job response data lacks an object 'resultUrl'.","commonSituations":"A completed job status response did not include the 'resultUrl' object. Occurs when polling a job whose results expired or were never produced. Re-submit the job and fetch results promptly.","solutions":["Only request result URLs after the job reaches the 'done' state; poll the job status first.","Verify the job actually completed successfully rather than failing, since failed jobs have no resultUrl.","Inspect the status response data to confirm the server included resultUrl."],"exampleFix":"status = client.get_status(job_id)\nif status.state != \"done\":\n    ...  # keep polling; resultUrl only exists for done jobs","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2661c7c0ef5c613e8f93c6e93b2e052399f0f854","analyzedAt":"2026-08-14T20:17:30.180Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}