zylon-ai/private-gpt · error · RuntimeError

The tabular data analysis tool is not available because Pand

Error message

The tabular data analysis tool is not available because PandasAI is not installed. Install it with: uv sync --extra tool-tabular

What it means

RuntimeError raised by the TabularDataProcessor when build_tool raises ImportError because the PandasAI dependency (optional extra 'tool-tabular') is not installed. The processor logs a warning and converts the ImportError into an actionable install message.

Source

Thrown at private_gpt/components/tools/processors/tabular_data_processor.py:64

            if not ingested_artifacts:
                raise ValueError(
                    "Tabular data analysis tool requires an ingested artifact context.",
                )
            if len(ingested_artifacts) > 1:
                raise ValueError("Only one ingested context is supported.")

            try:
                resolved = await self._builder.build_tool(
                    model_id=request.system.model,
                    name=tool.name or TABULAR_DATA_ANALYSIS,
                    type=tool.type or TABULAR_DATA_ANALYSIS + "_v1",
                    context_filter=ingested_artifacts[0].context_filter,
                    validate=request.tool_config.validation_mode,
                    blob_visibility=request.system.blob_visibility,
                )
            except ImportError as e:
                logger.warning("Tabular tool unavailable: %s", e)
                raise RuntimeError(_PANDASAI_NOT_INSTALLED_MSG) from e

            return _replace_tool(request, tool, [resolved])
        return False

View on GitHub (pinned to 4a030776a3)

Solutions

  1. Install the extra: uv sync --extra tool-tabular (or pip install 'private-gpt[tool-tabular]')
  2. Rebuild/redeploy the environment so the new dependency is present
  3. If the tool is not needed, disable TABULAR_DATA_ANALYSIS in tool config so the processor never tries to build it

Example fix

# before: base install only
uv sync
# after
uv sync --extra tool-tabular
Defensive patterns

Strategy: fallback

Validate before calling

def tabular_tool_available() -> bool:
    try:
        import pandasai  # noqa: F401
        return True
    except ImportError:
        return False

if not tabular_tool_available():
    # omit TABULAR_DATA_ANALYSIS from the request instead of failing

Try / catch

try:
    resp = await client.chat(request)
except RuntimeError as e:
    if "PandasAI is not installed" in str(e):
        # either install the extra or degrade gracefully without the tabular tool
        raise

Prevention

When it happens

Trigger: Requesting the tabular data analysis tool (with a valid IngestedArtifact) on an environment installed without the tool-tabular extra, so the builder's `import pandasai` (or related module) fails.

Common situations: Deploying with a base install profile that omits optional tool extras; CI image built without --extra tool-tabular; upgrading and lockfile dropping the optional group.

Related errors


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