zylon-ai/private-gpt · error · ImportError
PPTX reader dependencies are not installed. Install with `uv
Error message
PPTX reader dependencies are not installed. Install with `uv sync --inexact --extra ingest-documents`.
What it means
Raised as ImportError by PPTX2MdReaderFactory.create_reader when the lazy import of the pptx2md reader module fails because the python-pptx/markitdown-pptx style dependencies of that reader are absent. Those dependencies ship in the 'ingest-documents' extra, and the message embeds the exact uv sync command. The original ImportError is preserved as __cause__.
Source
Thrown at private_gpt/components/readers/factories/pptx2md.py:15
from private_gpt.components.readers.base_reader import IngestionReader
from private_gpt.components.readers.factories.base import ReaderFactory
from private_gpt.utils.dependencies import format_missing_dependency_message
class PPTX2MdReaderFactory(ReaderFactory):
def create_reader(self, extension: str | None = None) -> IngestionReader:
del extension
try:
from private_gpt.components.readers.pptx2md.pptx2md_reader import (
PPTX2MdReader,
)
except ImportError as e:
raise ImportError(
format_missing_dependency_message(
"PPTX reader",
extras="ingest-documents",
)
) from e
return PPTX2MdReader(reader_settings=self.settings.transformation.pptx)
View on GitHub (pinned to 4a030776a3)
Solutions
- Run uv sync --inexact --extra ingest-documents as stated in the message.
- Rebuild your Docker/CI image to include the extra if the error appears only in deployed environments.
- If you cannot install the extra, switch that file type's ingestion to the 'docling' reader, which handles pptx via the Docling server without these local deps.
- If the extra is installed but the error persists, inspect e.__cause__ for the specific missing inner package and install it.
Example fix
# fix at environment level # uv sync --inexact --extra ingest-documents # or switch reader in settings # docling handles pptx server-side
Defensive patterns
Strategy: validation
Validate before calling
def pptx_deps_available() -> bool:
try:
import pptx # python-pptx powers the pptx2md reader
return True
except ImportError:
return False
if not pptx_deps_available():
raise SystemExit("Install first: uv sync --inexact --extra ingest-documents") Type guard
def pptx_deps_available() -> bool:
try:
import pptx # noqa: F401
return True
except ImportError:
return False Try / catch
try:
reader = registry.get_factory("pptx2md").create_reader()
except ImportError as e:
if "ingest-documents" in str(e):
raise SystemExit("Run: uv sync --inexact --extra ingest-documents") from e
raise Prevention
- Bake the ingest-documents extra into Docker/CI images whenever pptx ingestion is enabled.
- If the extra cannot be installed, route .pptx files to the docling reader instead.
When it happens
Trigger: Selecting the 'pptx2md' reader (get_factory('pptx2md').create_reader()) in an environment installed without the ingest-documents extra — the lazy import inside create_reader raises ImportError and is re-raised with the install instructions.
Common situations: Default `uv sync` install (no extras) then enabling pptx2md in settings; CI environments provisioned only for docling ingestion; slim Docker images; upgrading private-gpt where extras were renamed (previously different extra names covered these deps).
Related errors
- MarkItDown reader dependencies are not installed. Install wi
- Delimited text reader dependencies are not installed.
- Email reader dependencies are not installed.
- HTML reader dependencies are not installed. Install with `uv
- Redis cache dependencies are not installed. Install with `uv
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/e837f05d7c01d501.
Report an issue: GitHub.