docling-project/docling · error · ConversionError
No extraction pipeline could be initialized for {in_doc.file
Error message
No extraction pipeline could be initialized for {in_doc.file}. What it means
ConversionError raised by DocumentExtractor._execute_extraction when the input document is valid but _get_pipeline(in_doc.format) returns None, i.e. no extraction pipeline is configured for that format. With raises_on_error=False it instead returns a FAILURE ExtractionResult.
Source
Thrown at docling/document_extractor.py:280
)
def _execute_extraction_pipeline(
self,
in_doc: InputDocument,
raises_on_error: bool,
template: ExtractionTemplateType,
) -> ExtractionResult:
if not in_doc.valid:
return ExtractionResult(
input=in_doc,
status=ConversionStatus.FAILURE,
errors=build_invalid_input_errors(in_doc),
)
pipeline = self._get_pipeline(in_doc.format)
if pipeline is None:
if raises_on_error:
raise ConversionError(
f"No extraction pipeline could be initialized for {in_doc.file}."
)
else:
return ExtractionResult(input=in_doc, status=ConversionStatus.FAILURE)
return pipeline.execute(
in_doc, raises_on_error=raises_on_error, template=template
)
def _get_pipeline(
self, doc_format: InputFormat
) -> Optional[BaseExtractionPipeline]:
"""Retrieve or initialize a pipeline, reusing instances based on class and options."""
fopt = self.extraction_format_to_options.get(doc_format)
if fopt is None or fopt.pipeline_options is None:
return None
pipeline_class = fopt.pipeline_clsView on GitHub (pinned to 61d76f1ff3)
Solutions
- Supply format_options for the format: DocumentExtractor(format_options={InputFormat.PDF: ExtractionFormatOption(pipeline_cls=ExtractionVlmPipeline)}).
- Verify the key you used in format_options is the same InputFormat the file resolves to (extension-based).
- Set raises_on_error=False to get a FAILURE result instead of an exception and inspect it.
Example fix
# before
extractor = DocumentExtractor() # relies on defaults for a non-default format
# after
from docling.datamodel.settings import ExtractionFormatOption
extractor = DocumentExtractor(
format_options={InputFormat.PDF: ExtractionFormatOption()} # explicit pipeline
) Defensive patterns
Strategy: validation
Validate before calling
fmt = InputFormat.PDF # resolved from extension
if fmt not in extractor.format_to_options:
raise SystemExit(f'add format_options for {fmt} to DocumentExtractor') Try / catch
from docling.datamodel.base_models import ConversionError
try:
res = extractor.extract(path, raises_on_error=True)
except ConversionError as e:
if 'No extraction pipeline' in str(e):
raise SystemExit('configure ExtractionFormatOption(pipeline_cls=...) for this format')
raise Prevention
- Configure format_options for every format you will extract before starting a batch.
- Unit-test extractor setup against the exact InputFormat your inputs resolve to.
When it happens
Trigger: Running extract() on a valid document whose format has no matching entry in the extractor's format_to_options map (no format_options supplied for that InputFormat).
Common situations: Using DocumentExtractor with default options on formats outside the defaults; constructing the extractor with format_options keyed by the wrong InputFormat; typo'd pipeline class registration.
Related errors
- No pipeline could be initialized for format {format}
- No pipeline could be initialized for {in_doc.file}.
- No default extraction backend configured for {fmt}
- Extraction failed for: {ext_res.input.file} with status: {ex
- The selected backend {type(conv_res.input._backend).__name__
AI-assisted analysis of docling-project/docling@61d76f1ff3 (2026-08-14).
Data as JSON: /api/errors/8f5434d6d53dd271.
Report an issue: GitHub.