{"record":{"id":"767e53c0fe41f426","repo":"docling-project/docling","slug":"p-does-not-exist-or-is-not-a-directory-containin","errorCode":null,"errorMessage":"{p} does not exist or is not a directory containing the required models","messagePattern":"(.+?) does not exist or is not a directory containing the required models","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"docling/experimental/pipeline/threaded_layout_vlm_pipeline.py","lineNumber":223,"sourceCode":"                    vlm_options=vlm_options,\n                )\n            else:\n                raise ValueError(\n                    f\"Unsupported VLM inference framework: {vlm_options.inference_framework}\"\n                )\n        else:\n            raise ValueError(f\"Unsupported VLM options type: {type(base_vlm_options)}\")\n\n    def _resolve_artifacts_path(self) -> Optional[Path]:\n        \"\"\"Resolve artifacts path from options or settings.\"\"\"\n        if self.pipeline_options.artifacts_path:\n            p = Path(self.pipeline_options.artifacts_path).expanduser()\n        elif settings.artifacts_path:\n            p = Path(settings.artifacts_path).expanduser()\n        else:\n            return None\n        if not p.is_dir():\n            raise RuntimeError(\n                f\"{p} does not exist or is not a directory containing the required models\"\n            )\n        return p\n\n    def _create_run_ctx(self) -> RunContext:\n        \"\"\"Create pipeline stages and wire them together.\"\"\"\n        opts = self.pipeline_options\n\n        # Layout stage\n        layout_stage = ThreadedPipelineStage(\n            name=\"layout\",\n            model=self.layout_model,\n            batch_size=opts.layout_batch_size,\n            batch_timeout=opts.batch_timeout_seconds,\n            queue_max_size=opts.queue_max_size,\n        )\n\n        # Layout post-processing stage","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/experimental/pipeline/threaded_layout_vlm_pipeline.py#L205-L241","documentation":"RuntimeError from ThreadedLayoutVlmPipeline._resolve_artifacts_path: an artifacts directory was configured (via pipeline_options.artifacts_path or settings.artifacts_path) but it does not exist or is not a directory. The pipeline needs that directory to hold downloaded model artifacts (layout/VLM models).","triggerScenarios":"Setting artifacts_path to a wrong/stale path, or setting the global docling settings.artifacts_path to a directory that was deleted or never created, then initializing/running the threaded pipeline.","commonSituations":"Docker images where the artifacts volume is not mounted at the expected path; CI caching that pruned the models dir; moving a project between machines and the absolute artifacts path no longer resolves.","solutions":["Point artifacts_path to an existing directory containing the required models, or unset it to let Docling manage the default download location.","If models are missing, pre-download/copy them into the directory (e.g. via the docling-tools artifacts flow) and re-run.","Check settings.artifacts_path in global settings is not accidentally overriding the pipeline-level option with a stale path."],"exampleFix":"# before\nopts = ThreadedLayoutVlmPipelineOptions(artifacts_path='/opt/models')  # missing dir\n\n# after\nfrom pathlib import Path\np = Path('/opt/models')\nassert p.is_dir(), f'create and populate {p} first'\nopts = ThreadedLayoutVlmPipelineOptions(artifacts_path=p)","handlingStrategy":"validation","validationCode":"from pathlib import Path\np = Path(opts.artifacts_path) if opts.artifacts_path else settings.artifacts_path\nif p is not None and not Path(p).is_dir():\n    raise SystemExit(f'artifacts dir {p} missing; create/download models first')","typeGuard":null,"tryCatchPattern":"try:\n    pipeline = ThreadedLayoutVlmPipeline(opts)\nexcept RuntimeError as e:\n    if 'does not exist or is not a directory' in str(e):\n        raise SystemExit('fix artifacts_path or unset it to use the default download location')","preventionTips":["Add a startup assertion that the artifacts directory exists before initializing pipelines.","In containers, mount the model artifacts volume at the exact configured path and verify in the entrypoint."],"tags":["artifacts","filesystem","configuration","vlm"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}