{"record":{"id":"e3bc15740488692c","repo":"docling-project/docling","slug":"no-default-extraction-backend-configured-for-fmt","errorCode":null,"errorMessage":"No default extraction backend configured for {fmt}","messagePattern":"No default extraction backend configured for (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"docling/document_extractor.py","lineNumber":83,"sourceCode":"            self.pipeline_options = self.pipeline_cls.get_default_options()  # type: ignore[assignment]\n        return self\n\n\ndef _get_default_extraction_option(fmt: InputFormat) -> ExtractionFormatOption:\n    \"\"\"Return the default extraction option for a given input format.\n\n    Defaults mirror the converter's *backend* choices, while the pipeline is\n    the VLM extractor. This duplication will be removed when we deduplicate\n    the format registry between convert/extract.\n    \"\"\"\n    format_to_default_backend: dict[InputFormat, Type[AbstractDocumentBackend]] = {\n        InputFormat.IMAGE: ImageDocumentBackend,\n        InputFormat.PDF: PyPdfiumDocumentBackend,\n    }\n\n    backend = format_to_default_backend.get(fmt)\n    if backend is None:\n        raise RuntimeError(f\"No default extraction backend configured for {fmt}\")\n\n    return ExtractionFormatOption(\n        pipeline_cls=ExtractionVlmPipeline,\n        backend=backend,\n    )\n\n\nclass DocumentExtractor:\n    \"\"\"Standalone extractor class.\n\n    Public API:\n        - `extract(...) -> ExtractionResult`\n        - `extract_all(...) -> Iterator[ExtractionResult]`\n\n    Implementation intentionally reuses `_DocumentConversionInput` to build\n    `InputDocument` with the correct backend per format.\n    \"\"\"\n","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/document_extractor.py#L65-L101","documentation":"RuntimeError thrown by the standalone DocumentExtractor's default-options helper when an extraction is requested for an InputFormat that has no default backend mapping. Only InputFormat.IMAGE and InputFormat.PDF have defaults; everything else requires the caller to supply an ExtractionFormatOption explicitly.","triggerScenarios":"Calling DocumentExtractor.extract() on a file whose format resolves to something other than IMAGE or PDF without passing a matching format_options entry with an explicit backend.","commonSituations":"Using the new extraction API on HTML, AsciiDoc, or Office inputs and assuming it mirrors DocumentConverter's coverage; upgrading Docling where the extractor registry (intentionally minimal) does not yet cover your format.","solutions":["Pass explicit format options for the format: DocumentExtractor(format_options={fmt: ExtractionFormatOption(pipeline_cls=..., backend=SomeBackend)}).","Convert the document to PDF or an image first with DocumentConverter, then run extraction on that.","Restrict extraction inputs to IMAGE/PDF, which are the only formats with defaults."],"exampleFix":"# before\nextractor = DocumentExtractor()\nres = extractor.extract('page.html')  # RuntimeError: no default backend\n\n# after\nfrom docling.datamodel.settings import ExtractionFormatOption\nopts = ExtractionFormatOption(pipeline_cls=ExtractionVlmPipeline, backend=MyHtmlBackend)\nextractor = DocumentExtractor(format_options={InputFormat.HTML: opts})","handlingStrategy":"validation","validationCode":"from docling.datamodel.base_models import InputFormat\nDEFAULT_EXTRACT_FORMATS = {InputFormat.IMAGE, InputFormat.PDF}\nif fmt not in DEFAULT_EXTRACT_FORMATS and fmt not in extractor.format_to_options:\n    raise SystemExit(f'{fmt} needs an explicit ExtractionFormatOption with a backend')","typeGuard":null,"tryCatchPattern":"try:\n    res = extractor.extract(path)\nexcept RuntimeError as e:\n    if 'No default extraction backend' in str(e):\n        raise SystemExit('pass format_options={fmt: ExtractionFormatOption(...)} for this format')\n    raise","preventionTips":["Default to PDF/image inputs for extraction; pre-convert other formats.","Always pass explicit format_options when using DocumentExtractor with non-default formats."],"tags":["extraction","backend","configuration"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}