{"record":{"id":"9aeb4640a36cc2db","repo":"zylon-ai/private-gpt","slug":"the-tabular-data-analysis-tool-is-not-available-be","errorCode":null,"errorMessage":"The tabular data analysis tool is not available because PandasAI is not installed. Install it with: uv sync --extra tool-tabular","messagePattern":"The tabular data analysis tool is not available because PandasAI is not installed\\. Install it with: uv sync --extra tool-tabular","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"private_gpt/components/tools/processors/tabular_data_processor.py","lineNumber":64,"sourceCode":"            if not ingested_artifacts:\n                raise ValueError(\n                    \"Tabular data analysis tool requires an ingested artifact context.\",\n                )\n            if len(ingested_artifacts) > 1:\n                raise ValueError(\"Only one ingested context is supported.\")\n\n            try:\n                resolved = await self._builder.build_tool(\n                    model_id=request.system.model,\n                    name=tool.name or TABULAR_DATA_ANALYSIS,\n                    type=tool.type or TABULAR_DATA_ANALYSIS + \"_v1\",\n                    context_filter=ingested_artifacts[0].context_filter,\n                    validate=request.tool_config.validation_mode,\n                    blob_visibility=request.system.blob_visibility,\n                )\n            except ImportError as e:\n                logger.warning(\"Tabular tool unavailable: %s\", e)\n                raise RuntimeError(_PANDASAI_NOT_INSTALLED_MSG) from e\n\n            return _replace_tool(request, tool, [resolved])\n        return False\n","sourceCodeStart":46,"sourceCodeEnd":68,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/components/tools/processors/tabular_data_processor.py#L46-L68","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install the extra: uv sync --extra tool-tabular (or pip install 'private-gpt[tool-tabular]')","Rebuild/redeploy the environment so the new dependency is present","If the tool is not needed, disable TABULAR_DATA_ANALYSIS in tool config so the processor never tries to build it"],"exampleFix":"# before: base install only\nuv sync\n# after\nuv sync --extra tool-tabular","handlingStrategy":"fallback","validationCode":"def tabular_tool_available() -> bool:\n    try:\n        import pandasai  # noqa: F401\n        return True\n    except ImportError:\n        return False\n\nif not tabular_tool_available():\n    # omit TABULAR_DATA_ANALYSIS from the request instead of failing","typeGuard":null,"tryCatchPattern":"try:\n    resp = await client.chat(request)\nexcept RuntimeError as e:\n    if \"PandasAI is not installed\" in str(e):\n        # either install the extra or degrade gracefully without the tabular tool\n        raise","preventionTips":["Include --extra tool-tabular in deployment install commands when tabular analysis is offered","Feature-flag the tabular tool on a dependency probe at startup","Keep CI matrix covering both with-extra and without-extra installs"],"tags":["dependencies","optional-extra","pandasai","tools"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}