{"record":{"id":"aabc5e71e288efb7","repo":"PaddlePaddle/PaddleOCR","slug":"file-not-found-path","errorCode":null,"errorMessage":"File not found: ${path}","messagePattern":"File not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"api_sdk/typescript/src/client.ts","lineNumber":191,"sourceCode":"      }];\n    });\n  }\n\n  private collectMappedResourcePlans(resources: Record<string, string>): ResourceSavePlan[] {\n    return Object.keys(resources)\n      .sort()\n      .map((key) => ({\n        resourceUrl: resources[key],\n        filename: safeMapKeyFilename(key),\n      }));\n  }\n\n  private async requireExistingDirectory(destination: string): Promise<void> {\n    let destinationStat;\n    try {\n      destinationStat = await stat(destination);\n    } catch {\n      throw new FileNotFoundError(destination);\n    }\n    if (!destinationStat.isDirectory()) {\n      throw new InvalidRequestError(`Destination must be an existing directory: ${destination}`);\n    }\n  }\n\n  private async requireWritableTarget(target: string, options: SaveResourceOptions): Promise<void> {\n    try {\n      await stat(target);\n    } catch {\n      return;\n    }\n    if (!options.overwrite) {\n      throw new InvalidRequestError(`Destination already exists: ${target}`);\n    }\n  }\n\n  private requireUniqueTargets(targets: string[], options: SaveResourceOptions): void {","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/PaddlePaddle/PaddleOCR/blob/2661c7c0ef5c613e8f93c6e93b2e052399f0f854/api_sdk/typescript/src/client.ts#L173-L209","documentation":"Thrown by parse_batch_status in paddleocr/_api_client/_core.py:198 when a batch status response's data object does not contain a list 'extractResult'. The batch endpoint must return one entry per job under data.extractResult; a missing or non-list value prevents building the BatchStatus. It is a ResponseFormatError, i.e. the server broke the documented batch schema.","triggerScenarios":"Calling client.get_batch_status(batch_id) (directly or via wait/poll helpers) where the 2xx response's data lacks extractResult or has it as an object/string/null.","commonSituations":"Passing a jobId instead of a batchId to the batch endpoint; querying a batch that was never created server-side; API version drift renaming the field; empty-batch edge case handled differently by the server.","solutions":["Confirm the identifier passed is a batchId (returned when submitting with a batch), not a jobId","Inspect the raw batch response body to see the actual data shape","Verify the batch was created successfully (the submit that included batch_id returned a jobId)","Upgrade the paddleocr SDK if the batch response schema changed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":"def has_extract_result(data: dict) -> bool:\n    return isinstance(data.get(\"extractResult\"), list)","tryCatchPattern":"from paddleocr._api_client.errors import ResponseFormatError\ntry:\n    batch = client.get_batch_status(batch_id)\nexcept ResponseFormatError as e:\n    if \"extractResult\" in str(e):\n        raise ValueError(f\"Not a valid batch id or malformed batch response: {batch_id}\") from e","preventionTips":["Store batchIds separately from jobIds and never interchange them","Confirm the submit call that created the batch succeeded before polling it"],"tags":["api","response-format","batch","schema"],"backgroundTag":null,"analyzedSha":"2661c7c0ef5c613e8f93c6e93b2e052399f0f854","analyzedAt":"2026-08-14T20:17:30.180Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}