{"record":{"id":"398f6a9736f36c15","repo":"docling-project/docling","slug":"no-pipeline-could-be-initialized-for-in-doc-file","errorCode":null,"errorMessage":"No pipeline could be initialized for {in_doc.file}.","messagePattern":"No pipeline could be initialized for (.+?)\\.","errorType":"exception","errorClass":"ConversionError","httpStatus":null,"severity":"error","filePath":"docling/document_converter.py","lineNumber":775,"sourceCode":"\n    def _unload_input_document(self, in_doc: InputDocument) -> None:\n        backend = getattr(in_doc, \"_backend\", None)\n        if backend is not None:\n            backend.unload()\n\n    def _execute_pipeline(\n        self, in_doc: InputDocument, raises_on_error: bool\n    ) -> ConversionResult:\n        if in_doc.valid:\n            pipeline_started = False\n            try:\n                pipeline = self._get_pipeline(in_doc.format)\n                if pipeline is not None:\n                    pipeline_started = True\n                    conv_res = pipeline.execute(in_doc, raises_on_error=raises_on_error)\n                else:\n                    if raises_on_error:\n                        raise ConversionError(\n                            f\"No pipeline could be initialized for {in_doc.file}.\"\n                        )\n                    else:\n                        _log.warning(\n                            \"No pipeline could be initialized for %s.\", in_doc.file\n                        )\n                        conv_res = ConversionResult(\n                            input=in_doc,\n                            status=ConversionStatus.FAILURE,\n                        )\n            finally:\n                if not pipeline_started:\n                    self._unload_input_document(in_doc)\n        else:\n            try:\n                _log.warning(\"Input document %s is not valid.\", in_doc.file)\n                conv_res = ConversionResult(\n                    input=in_doc,","sourceCodeStart":757,"sourceCodeEnd":793,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/document_converter.py#L757-L793","documentation":"Raised (as ConversionError) or logged as a warning by DocumentConverter._execute_pipeline when the input document is valid but the converter has no registered pipeline for its InputFormat. This happens when the format was allowed through input validation but no format_options/pipeline was configured for it.","triggerScenarios":"Calling convert() on a file whose format is not in format_options (or allowed_formats matching by extension only), so _get_pipeline(in_doc.format) returns None while raises_on_error=True.","commonSituations":"Converting an uncommon format (e.g. XML, audio) without adding the corresponding PdfFormatOption/... entry to format_options; a custom InputFormat added by subclassing; version upgrade where a pipeline moved behind an extra that is not installed.","solutions":["Add an explicit format option for the format you are converting, e.g. DocumentConverter(format_options={InputFormat.PDF: PdfFormatOption(...)}) and confirm the right pipeline class is set.","Check that the correct Docling extra is installed (e.g. docling[vlm], backend-specific extras) so the pipeline class can be imported and initialized.","If you want a soft failure instead of an exception, call convert with raises_on_error=False and inspect result.status for ConversionStatus.FAILURE."],"exampleFix":"# before\nconverter = DocumentConverter()  # no format_options for the target format\nres = next(converter.convert('file.xyz'))  # ConversionError: no pipeline\n\n# after\nfrom docling.datamodel.pipeline_options import PdfFormatOption\nconverter = DocumentConverter(\n    format_options={InputFormat.PDF: PdfFormatOption(pipeline_options=...)}\n)","handlingStrategy":"try-catch","validationCode":"fmt = InputFormat.PDF  # resolved from the file extension\nif fmt not in converter.format_to_options:\n    raise SystemExit(f'no pipeline configured for {fmt}; add format_options')","typeGuard":null,"tryCatchPattern":"from docling.datamodel.base_models import ConversionError\ntry:\n    res = next(converter.convert(path))\nexcept ConversionError as e:\n    if 'No pipeline could be initialized' in str(e):\n        # register format_options for the format and retry once\n        raise","preventionTips":["Always construct DocumentConverter with explicit format_options covering every format you will feed it.","For batch services, prefer raises_on_error=False and branch on result.status."],"tags":["pipeline","configuration","input-format"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}