PaddlePaddle/PaddleOCR · error · ValueError

Invalid pipeline version: {pipeline_version}. Supported vers

Error message

Invalid pipeline version: {pipeline_version}. Supported versions are {_AVAILABLE_PIPELINE_VERSIONS}.

What it means

The PaddleOCR-VL pipeline constructor validates pipeline_version against _AVAILABLE_PIPELINE_VERSIONS (['v1','v1.5','v1.6']) and raises ValueError for anything else, including omitted values only if the default is not in the list — in practice this fires when an explicit wrong version string is passed. It fails fast before any model is loaded.

Source

Thrown at paddleocr/_pipelines/paddleocr_vl.py:71

        vl_rec_api_key=None,
        doc_orientation_classify_model_name=None,
        doc_orientation_classify_model_dir=None,
        doc_unwarping_model_name=None,
        doc_unwarping_model_dir=None,
        use_doc_orientation_classify=None,
        use_doc_unwarping=None,
        use_layout_detection=None,
        use_chart_recognition=None,
        use_seal_recognition=None,
        use_ocr_for_image_block=None,
        format_block_content=None,
        merge_layout_blocks=None,
        markdown_ignore_labels=None,
        use_queues=None,
        **kwargs,
    ):
        if pipeline_version not in _AVAILABLE_PIPELINE_VERSIONS:
            raise ValueError(
                f"Invalid pipeline version: {pipeline_version}. Supported versions are {_AVAILABLE_PIPELINE_VERSIONS}."
            )

        if vl_rec_backend is not None and vl_rec_backend not in _SUPPORTED_VL_BACKENDS:
            raise ValueError(
                f"Invalid backend for the VL recognition module: {vl_rec_backend}. Supported values are {_SUPPORTED_VL_BACKENDS}."
            )

        params = locals().copy()
        params.pop("self")
        params.pop("pipeline_version")
        params.pop("kwargs")
        self._params = params
        self.pipeline_version = pipeline_version

        super().__init__(**kwargs)

    @property

View on GitHub (pinned to 2661c7c0ef)

Solutions

  1. Pass a listed version, e.g. pipeline_version='v1.6', or omit it to use the default.
  2. Upgrade paddleocr to the release that ships the version you need.
  3. Print/inspect paddleocr._pipelines.paddleocr_vl._AVAILABLE_PIPELINE_VERSIONS for your install to see what is valid.

Example fix

# before
pipe = PaddleOCRVL(pipeline_version='1.6')  # ValueError
# after
pipe = PaddleOCRVL(pipeline_version='v1.6')
Defensive patterns

Strategy: validation

Validate before calling

from paddleocr._pipelines.paddleocr_vl import _AVAILABLE_PIPELINE_VERSIONS

def valid_pipeline_version(v: str) -> bool:
    return v is None or v in _AVAILABLE_PIPELINE_VERSIONS

Prevention

When it happens

Trigger: PaddleOCRVL(pipeline_version='v2'), PaddleOCRVL(pipeline_version='1.6') (missing 'v'), or a version not yet shipped in the installed paddleocr release.

Common situations: Using a version string from release notes newer than the installed package; copy-pasting 'v1.5'-style strings into deployments with older paddleocr; CI building with a pinned older version while config targets a newer one.

Related errors


AI-assisted analysis of PaddlePaddle/PaddleOCR@2661c7c0ef (2026-08-14). Data as JSON: /api/errors/3a0fbe58b5a20dda. Report an issue: GitHub.