docling-project/docling · error · ConversionError

No pipeline could be initialized for {in_doc.file}.

Error message

No pipeline could be initialized for {in_doc.file}.

What it means

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.

Source

Thrown at docling/document_converter.py:775

    def _unload_input_document(self, in_doc: InputDocument) -> None:
        backend = getattr(in_doc, "_backend", None)
        if backend is not None:
            backend.unload()

    def _execute_pipeline(
        self, in_doc: InputDocument, raises_on_error: bool
    ) -> ConversionResult:
        if in_doc.valid:
            pipeline_started = False
            try:
                pipeline = self._get_pipeline(in_doc.format)
                if pipeline is not None:
                    pipeline_started = True
                    conv_res = pipeline.execute(in_doc, raises_on_error=raises_on_error)
                else:
                    if raises_on_error:
                        raise ConversionError(
                            f"No pipeline could be initialized for {in_doc.file}."
                        )
                    else:
                        _log.warning(
                            "No pipeline could be initialized for %s.", in_doc.file
                        )
                        conv_res = ConversionResult(
                            input=in_doc,
                            status=ConversionStatus.FAILURE,
                        )
            finally:
                if not pipeline_started:
                    self._unload_input_document(in_doc)
        else:
            try:
                _log.warning("Input document %s is not valid.", in_doc.file)
                conv_res = ConversionResult(
                    input=in_doc,

View on GitHub (pinned to 61d76f1ff3)

Solutions

  1. 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.
  2. Check that the correct Docling extra is installed (e.g. docling[vlm], backend-specific extras) so the pipeline class can be imported and initialized.
  3. If you want a soft failure instead of an exception, call convert with raises_on_error=False and inspect result.status for ConversionStatus.FAILURE.

Example fix

# before
converter = DocumentConverter()  # no format_options for the target format
res = next(converter.convert('file.xyz'))  # ConversionError: no pipeline

# after
from docling.datamodel.pipeline_options import PdfFormatOption
converter = DocumentConverter(
    format_options={InputFormat.PDF: PdfFormatOption(pipeline_options=...)}
)
Defensive patterns

Strategy: try-catch

Validate before calling

fmt = InputFormat.PDF  # resolved from the file extension
if fmt not in converter.format_to_options:
    raise SystemExit(f'no pipeline configured for {fmt}; add format_options')

Try / catch

from docling.datamodel.base_models import ConversionError
try:
    res = next(converter.convert(path))
except ConversionError as e:
    if 'No pipeline could be initialized' in str(e):
        # register format_options for the format and retry once
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of docling-project/docling@61d76f1ff3 (2026-08-14). Data as JSON: /api/errors/398f6a9736f36c15. Report an issue: GitHub.