zylon-ai/private-gpt · error · ValueError

Reader '{normalized_name}' is not supported. Available: {ava

Error message

Reader '{normalized_name}' is not supported. Available: {available}

What it means

Raised by ReaderFactoryRegistry.get_factory when the requested reader name (after normalization: stripped and lowercased) is not in the registry. The registry's built-ins are docling, pptx2md, markitdown, text, and vision; more can be added with register_factory()/register_reader(). The message helpfully lists the actual available names, so the fastest diagnosis is comparing your value against that list.

Source

Thrown at private_gpt/components/readers/factories/factory.py:58

            "vision": VisionReaderFactory(settings, injector),
        }
        self._factories: dict[str, ReaderFactory] = {
            **built_ins,
            **{name: p(settings, injector) for name, p in _PROVIDERS.items()},
        }

    def register_factory(self, name: str, factory: ReaderFactory) -> None:
        self._factories[_normalize_reader_name(name)] = factory

    def unregister_factory(self, name: str) -> None:
        self._factories.pop(_normalize_reader_name(name), None)

    def get_factory(self, name: str) -> ReaderFactory:
        normalized_name = _normalize_reader_name(name)
        factory = self._factories.get(normalized_name)
        if factory is None:
            available = ", ".join(sorted(self._factories)) or "none"
            raise ValueError(
                f"Reader '{normalized_name}' is not supported. Available: {available}"
            )
        return factory

View on GitHub (pinned to 4a030776a3)

Solutions

  1. Use one of the names printed in the error's 'Available:' list (typically docling, markitdown, pptx2md, text, vision).
  2. For documents in general, 'docling' is the default full-featured reader; 'text' handles delimited/email/html/plain text; 'markitdown' and 'pptx2md' are format-specific helpers.
  3. If a custom reader should exist, verify the module calling register_reader()/register_factory() is imported before lookup.

Example fix

# settings.yaml — before
# readers selection: pdf

# after
# (use a registered reader name)
# e.g. docling
Defensive patterns

Strategy: type-guard

Validate before calling

BUILTIN_READERS = {"docling", "pptx2md", "markitdown", "text", "vision"}

def validate_reader_name(name: str) -> None:
    n = name.strip().lower()
    if n not in BUILTIN_READERS:
        raise SystemExit(f"reader '{name}' unknown; built-ins: {sorted(BUILTIN_READERS)}")

Type guard

BUILTIN_READERS = {"docling", "pptx2md", "markitdown", "text", "vision"}

def is_known_reader(name: str) -> bool:
    return name.strip().lower() in BUILTIN_READERS

Try / catch

try:
    factory = registry.get_factory(name)
except ValueError as e:
    if "is not supported" in str(e):
        available = str(e).split("Available:", 1)[-1]
        raise ConfigurationError(f"pick one of:{available}") from e
    raise

Prevention

When it happens

Trigger: Calling get_factory(name) with a name not in {docling, pptx2md, markitdown, text, vision} plus any registered custom readers — e.g., 'Docling' with different casing is fine (normalized) but 'docling-local', 'pdf', or 'azure' are not registered. Also fires for blank-adjacent names (blank raises a separate error).

Common situations: Setting the ingestion reader-selection to a removed or renamed reader after upgrading private-gpt; user expects a generic name like 'pdf' or 'office'; custom reader registered but the registering module was never imported; typo in settings.

Related errors


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