zylon-ai/private-gpt · error · HTTPException

Reader '{body.reader}' is not supported for '{extension}'. V

Error message

Reader '{body.reader}' is not supported for '{extension}'. Valid readers: {valid_readers}

What it means

Error "Reader '{body.reader}' is not supported for '{extension}'. Valid readers: {valid_readers}" thrown in zylon-ai/private-gpt.

Source

Thrown at private_gpt/server/ingest/convert_router.py:321

                "* object: Returns a hierarchical content tree with typed nodes\n\n"
                "Reader Selection:\n"
                "* Omit 'reader' to use the default reader for the detected file type\n"
                "* Use GET /v1/artifacts/readers to list available readers and their supported extensions"
            ),
        }
    },
)
def convert_content(request: Request, body: ConvertBody) -> ConvertResponse:
    service: ConvertService = request.state.injector.get(ConvertService)
    registry: ReaderRegistry = request.state.injector.get(ReaderRegistry)

    content = body.input.to_binary_content(get_file_name(body.metadata))
    extension = get_extension(content.filename)

    if body.reader:
        valid_readers = registry.get_reader_names(extension)
        if body.reader not in valid_readers:
            raise HTTPException(
                status_code=422,
                detail=(
                    f"Reader '{body.reader}' is not supported for '{extension}'. "
                    f"Valid readers: {valid_readers}"
                ),
            )

    with service.temporary_file(
        lambda: service.data_path_from_bin_data(
            content.data, get_extension(content.filename)
        )
    ) as data_path:
        result = service.convert_file(
            file_data=data_path,
            file_metadata={**(body.metadata or {}), "file_name": content.filename},
            reader=body.reader,
        )

View on GitHub (pinned to 4a030776a3)

Solutions

  1. Choose a reader from the valid_readers list reported in the error for the file's extension.
  2. Install the dependencies for the desired reader (e.g. `uv sync --inexact --extra ingest-documents`) and restart the server.
  3. Convert the file to an extension supported by an available reader before requesting conversion.
  4. Omit the reader field to let the server pick the default reader for the extension.

When it happens

Trigger: Raised when a convert request names a reader that is not registered or cannot handle the target file extension.

Common situations: Calling the convert endpoint with a reader that lacks its optional dependencies, or a typo in the reader name; valid readers for the extension are listed in the message.


AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15). Data as JSON: /api/errors/1e2c7e436b1fc039. Report an issue: GitHub.