{"record":{"id":"e67b520b2630968c","repo":"crewAIInc/crewAI","slug":"failed-to-install-singlestore-package","errorCode":null,"errorMessage":"Failed to install singlestore package","messagePattern":"Failed to install singlestore package","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/singlestore_search_tool/singlestore_search_tool.py","lineNumber":205,"sourceCode":"            conn_attrs = {}\n        if tables is None:\n            tables = []\n        if not SINGLSTORE_AVAILABLE:\n            import click\n\n            if click.confirm(\n                \"You are missing the 'singlestore' package. Would you like to install it?\"\n            ):\n                import subprocess\n\n                try:\n                    subprocess.run(\n                        [\"uv\", \"add\", \"crewai-tools[singlestore]\"],  # noqa: S607\n                        check=True,\n                    )\n\n                except subprocess.CalledProcessError as e:\n                    raise ImportError(\"Failed to install singlestore package\") from e\n            else:\n                raise ImportError(\n                    \"`singlestore` package not found, please run `uv add crewai-tools[singlestore]`\"\n                )\n\n        kwargs[\"data_type\"] = \"singlestore\"\n        super().__init__(**kwargs)\n\n        self.connection_args = {\n            \"host\": host,\n            \"user\": user,\n            \"password\": password,\n            \"port\": port,\n            \"database\": database,\n            \"driver\": driver,\n            # Connection behavior\n            \"pure_python\": pure_python,\n            \"local_infile\": local_infile,","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/singlestore_search_tool/singlestore_search_tool.py#L187-L223","documentation":"SingleStoreSearchTool offers an interactive bootstrap: if the singlestore package is missing, it prompts via click.confirm and runs `uv add crewai-tools[singlestore]`. This ImportError is raised when that subprocess exits non-zero (CalledProcessError), meaning the attempted install itself failed. The original subprocess error is chained via `from e`.","triggerScenarios":"Importing/instantiating SingleStoreSearchTool without singlestore installed, answering 'y' to the install prompt, while `uv` is missing from PATH, the project is not a uv workspace, the network is down, or the extra name is unavailable in the installed crewai-tools version.","commonSituations":"Running in an environment without uv installed (plain pip/conda users); running with a read-only project directory; CI runners where the interactive prompt is auto-confirmed but the package manager can't write; version mismatches where the [singlestore] extra does not exist.","solutions":["Install the dependency manually in your environment: uv add 'crewai-tools[singlestore]' (or pip install 'crewai-tools[singlestore]').","If you don't use uv, use pip: pip install singlestore; then re-instantiate the tool.","Check the chained CalledProcessError (raise ... from e) for the real failure — missing uv binary, network error, or permission issue — and fix that root cause."],"exampleFix":"# before (prompt auto-answered yes, uv add fails)\nfrom crewai_tools import SingleStoreSearchTool\ntool = SingleStoreSearchTool()\n\n# after (pre-install, no prompt path)\n# pip install 'crewai-tools[singlestore]'\nfrom crewai_tools import SingleStoreSearchTool\ntool = SingleStoreSearchTool()","handlingStrategy":"try-catch","validationCode":"import importlib.util\nif importlib.util.find_spec(\"singlestore\") is None:\n    raise RuntimeError(\"Run: pip install 'crewai-tools[singlestore]' before starting the app\")","typeGuard":null,"tryCatchPattern":"try:\n    tool = SingleStoreSearchTool(...)\nexcept ImportError as e:\n    # covers both install-failure and decline branches\n    raise RuntimeError(f\"singlestore dependency unavailable: {e}\") from e","preventionTips":["Pre-install 'crewai-tools[singlestore]' in your image/CI so the interactive install path never runs.","Check importlib.util.find_spec('singlestore') at startup and fail with a clear message."],"tags":["singlestore","dependency","installation","uv"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}