{"record":{"id":"a86bfad4fc6bb5e4","repo":"docling-project/docling","slug":"nemotron-ocr-artifacts-not-found-or-incomplete-in","errorCode":null,"errorMessage":"Nemotron OCR artifacts not found or incomplete in artifacts_path.\nExpected location: {nemotron_lang_dir}\nRequired files: {self._nemotron_checkpoint_files}\nAvailable directories in {artifacts_path}: {available_dirs}\nUse `docling-tools models download nemotron_ocr` to pre-download the checkpoints or unset artifacts_path to allow the upstream package to download them.","messagePattern":"Nemotron OCR artifacts not found or incomplete in artifacts_path\\.\nExpected location: (.+?)\nRequired files: (.+?)\nAvailable directories in (.+?): (.+?)\nUse `docling-tools models download nemotron_ocr` to pre-download the checkpoints or unset artifacts_path to allow the upstream package to download them\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"docling/models/stages/ocr/nemotron_ocr_model.py","lineNumber":213,"sourceCode":"            return None\n\n        nemotron_lang_dir = (\n            artifacts_path\n            / nemotron_ocr_model_dir()\n            / _NEMOTRON_OCR_LANG_TO_ARTIFACT_PATHS[language]\n        )\n        if nemotron_lang_dir.is_dir() and all(\n            (nemotron_lang_dir / f).is_file() for f in self._nemotron_checkpoint_files\n        ):\n            return nemotron_lang_dir\n\n        available_dirs = []\n        if artifacts_path.exists():\n            available_dirs = sorted(\n                path.name for path in artifacts_path.iterdir() if path.is_dir()\n            )\n\n        raise FileNotFoundError(\n            \"Nemotron OCR artifacts not found or incomplete in artifacts_path.\\n\"\n            f\"Expected location: {nemotron_lang_dir}\\n\"\n            f\"Required files: {self._nemotron_checkpoint_files}\\n\"\n            f\"Available directories in {artifacts_path}: {available_dirs}\\n\"\n            \"Use `docling-tools models download nemotron_ocr` to pre-download \"\n            \"the checkpoints or unset artifacts_path to allow the upstream \"\n            \"package to download them.\"\n        )\n\n    @staticmethod\n    def download_models(\n        local_dir: Optional[Path] = None,\n        force: bool = False,\n        progress: bool = False,\n    ) -> Path:\n        if local_dir is None:\n            local_dir = settings.cache_dir / \"models\" / nemotron_ocr_model_dir()\n","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/models/stages/ocr/nemotron_ocr_model.py#L195-L231","documentation":"When artifacts_path is set, the Nemotron stage requires the language-specific checkpoint directory to exist and to contain every file listed by the upstream CHECKPOINT_FILES constant. If the directory is missing or any required file is absent, FileNotFoundError is raised listing the expected location, required files, and the directories that do exist under artifacts_path.","triggerScenarios":"Setting pipeline_options.artifacts_path to a directory that lacks the nemotron_ocr/<lang> subdirectory (or has an incomplete download), then constructing the pipeline with NemotronOcrOptions.","commonSituations":"Reusing an artifacts_path populated for other docling models (layout, tableformer) but never Nemotron; interrupted `docling-tools models download nemotron_ocr`; wrong language variant downloaded.","solutions":["Pre-download the checkpoints: `docling-tools models download nemotron_ocr` into your artifacts_path and retry.","Or unset artifacts_path for this run so the upstream nemotron_ocr package downloads to its own cache automatically.","Compare the 'Required files' list in the error against what is on disk; delete the partial directory and re-download if any file is missing."],"exampleFix":"# before\npipeline_options.artifacts_path = Path(\"./models\")  # lacks nemotron_ocr/en -> FileNotFoundError\n\n# after (terminal)\ndocling-tools models download nemotron_ocr --artifacts-path ./models\n# or\npipeline_options.artifacts_path = None  # let the package download its own checkpoints","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef nemotron_artifacts_complete(artifacts: Path, lang_dir: str, required: list[str]) -> bool:\n    d = artifacts / \"nemotron_ocr\" / lang_dir\n    return d.is_dir() and all((d / f).is_file() for f in required)","typeGuard":null,"tryCatchPattern":"try:\n    converter = DocumentConverter(format_options={\"pdf\": PdfFormatOptions(ocr_options=NemotronOcrOptions())})\nexcept FileNotFoundError as err:\n    logger.error(\"Incomplete Nemotron artifacts: %s\", err)\n    raise SystemExit(\"Run: docling-tools models download nemotron_ocr\") from err","preventionTips":["Pre-download checkpoints with `docling-tools models download nemotron_ocr` as a provisioning step.","Validate the artifacts directory (all CHECKPOINT_FILES present for the target language) before pipeline construction.","Either fully manage artifacts_path or leave it unset — partial paths cause this error."],"tags":["nemotron","ocr","artifacts","model-download","file-not-found"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}