{"record":{"id":"5493cefefc17e651","repo":"docling-project/docling","slug":"no-default-options-configured-for-format","errorCode":null,"errorMessage":"No default options configured for {format}","messagePattern":"No default options configured for (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"docling/document_converter.py","lineNumber":311,"sourceCode":"        InputFormat.IMAGE: ImageFormatOption(),\n        InputFormat.PDF: PdfFormatOption(),\n        InputFormat.JSON_DOCLING: FormatOption(\n            pipeline_cls=SimplePipeline, backend=DoclingJSONBackend\n        ),\n        InputFormat.AUDIO: AudioFormatOption(),\n        InputFormat.VIDEO: VideoFormatOption(),\n        InputFormat.VTT: FormatOption(\n            pipeline_cls=SimplePipeline, backend=WebVTTDocumentBackend\n        ),\n        InputFormat.LATEX: LatexFormatOption(),\n        InputFormat.EMAIL: EmailFormatOption(),\n        InputFormat.EPUB: EpubFormatOption(),\n        InputFormat.EBCDIC: EbcdicFormatOption(),\n    }\n    if (options := format_to_default_options.get(format)) is not None:\n        return options\n    else:\n        raise RuntimeError(f\"No default options configured for {format}\")\n\n\nclass DocumentConverter:\n    \"\"\"Convert documents of various input formats to Docling documents.\n\n    `DocumentConverter` is the main entry point for converting documents in Docling.\n    It handles various input formats (PDF, DOCX, PPTX, images, HTML, Markdown, etc.)\n    and provides both single-document and batch conversion capabilities.\n\n    The conversion methods return a `ConversionResult` instance for each document,\n    which wraps a `DoclingDocument` object if the conversion was successful, along\n    with metadata about the conversion process.\n\n    Attributes:\n        allowed_formats: Allowed input formats.\n        format_to_options: Mapping of formats to their options.\n        initialized_pipelines: Cache of initialized pipelines keyed by\n            (pipeline class, options hash).","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/document_converter.py#L293-L329","documentation":"_get_default_options looks up the requested InputFormat in a hardcoded map of default FormatOption entries (PDF, DOCX, PPTX, VIDEO, VTT, LATEX, EMAIL, EPUB, EBCDIC, etc.). If the format has no entry in format_to_default_options, a RuntimeError is raised. This typically means the format enum exists but no default pipeline/backend is configured for it in this docling build (some formats require explicit options or extra dependencies).","triggerScenarios":"Calling code paths that resolve default options for an InputFormat that is not in the map — e.g. an InputFormat whose support depends on installed extras or an enum value added without a default entry. Passing allowed_formats containing such a format then triggering default-option resolution.","commonSituations":"docling-slim installs missing optional backends; using a newer InputFormat enum against older default-option wiring; constructing a DocumentConverter with formats that need explicit FormatOption.","solutions":["Register an explicit FormatOption for the format when building DocumentConverter(format_options={InputFormat.X: FormatOption(...)}) instead of relying on defaults.","Install the missing extras/backends for that format (e.g. the full docling package rather than slim).","Update docling so the format's default entry exists."],"exampleFix":"# before\nconverter = DocumentConverter(allowed_formats=[InputFormat.SOME_FORMAT])\n\n# after\nfrom docling.datamodel.base_models import FormatOption\nconverter = DocumentConverter(\n    format_options={InputFormat.SOME_FORMAT: FormatOption(pipeline_cls=..., backend=...)},\n)","handlingStrategy":"validation","validationCode":"from docling.datamodel.settings import _get_default_options  # or replicate the check\ndef has_default(fmt) -> bool:\n    try:\n        _get_default_options(fmt)\n        return True\n    except RuntimeError:\n        return False\n\nif not has_default(fmt):\n    format_options[fmt] = FormatOption(pipeline_cls=MyPipeline, backend=MyBackend)","typeGuard":null,"tryCatchPattern":"try:\n    opts = _get_default_options(fmt)\nexcept RuntimeError as e:\n    if \"No default options\" in str(e):\n        raise ValueError(f\"Format {fmt} requires explicit FormatOption\") from e\n    raise","preventionTips":["Always pass explicit format_options for non-default formats instead of relying on defaults.","Prefer the full docling package over slim when you need broad format coverage."],"tags":["input-format","format-options","document-converter","configuration","runtime-error"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}