{"record":{"id":"4e94cd430dbfe37f","repo":"PaddlePaddle/PaddleOCR","slug":"response-data-must-contain-non-empty-string-jobid","errorCode":null,"errorMessage":"Response data must contain non-empty string 'jobId'.","messagePattern":"Response data must contain non-empty string 'jobId'\\.","errorType":"exception","errorClass":"ResponseFormatError","httpStatus":null,"severity":"error","filePath":"paddleocr/_api_client/_core.py","lineNumber":177,"sourceCode":"    raise APIError(status_code, msg)\n\n\ndef unwrap_api_response(payload: dict, status_code: int) -> dict:\n    if not isinstance(payload, dict):\n        raise ResponseFormatError(\"Response body must be a JSON object.\")\n    code = payload.get(\"code\", 0)\n    if code not in (0, None):\n        raise APIError(status_code, extract_api_message_from_payload(payload) or \"\")\n    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:","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/PaddlePaddle/PaddleOCR/blob/2661c7c0ef5c613e8f93c6e93b2e052399f0f854/paddleocr/_api_client/_core.py#L159-L195","documentation":"Error \"Response data must contain non-empty string 'jobId'.\" thrown in PaddlePaddle/PaddleOCR.","triggerScenarios":"Raised by extract_job_id() when the API submit response data lacks a non-empty string 'jobId'.","commonSituations":"A job submission response lacked a valid 'jobId'. Occurs when the server accepts the request but returns an incomplete payload. Retry the submission; if persistent, check API version compatibility.","solutions":["Ensure the job submission request succeeded; the submit response must contain data.jobId as a non-empty string.","Check that the API base URL and model name are correct so the server actually creates a job.","Inspect the raw response JSON to confirm the server contract; report the mismatch if the server omits jobId."],"exampleFix":"job_id = data.get(\"jobId\")\nif not isinstance(job_id, str) or not job_id:\n    print(data)  # see what the server returned instead","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-15T22:17:37.221Z"}