{"record":{"id":"c696c42659fd666c","repo":"crewAIInc/crewAI","slug":"spider-client-package-not-found-please-run-uv","errorCode":null,"errorMessage":"`spider-client` package not found, please run `uv add spider-client`","messagePattern":"`spider-client` package not found, please run `uv add spider-client`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/spider_tool/spider_tool.py","lineNumber":110,"sourceCode":"        if website_url is not None:\n            self.website_url = website_url\n\n        self.log_failures = log_failures\n        self.custom_params = custom_params\n\n        try:\n            from spider import Spider\n\n        except ImportError:\n            import click\n\n            if click.confirm(\n                \"You are missing the 'spider-client' package. Would you like to install it?\"\n            ):\n                subprocess.run([\"uv\", \"pip\", \"install\", \"spider-client\"], check=True)  # noqa: S607\n                from spider import Spider  # type: ignore[import-untyped]\n            else:\n                raise ImportError(\n                    \"`spider-client` package not found, please run `uv add spider-client`\"\n                ) from None\n        self.spider = Spider(api_key=api_key)\n\n    def _validate_url(self, url: str) -> bool:\n        \"\"\"Validate URL format and security constraints.\n\n        Args:\n            url (str): URL to validate. Must be a properly formatted HTTP(S) URL\n\n        Returns:\n            bool: True if URL is valid and meets security requirements, False otherwise.\n        \"\"\"\n        try:\n            url = url.strip()\n            decoded_url = unquote(url)\n\n            result = urlparse(decoded_url)","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/spider_tool/spider_tool.py#L92-L128","documentation":"SpiderTool raises this ImportError when the spider-client package is absent and the user declines the click.confirm prompt that offers `uv pip install spider-client`. The `from None` suppresses the original import-error context; the message gives the exact manual install command.","triggerScenarios":"Instantiating SpiderTool without the spider package installed and answering 'no' at the interactive prompt; non-TTY environments where click.confirm cannot get input and aborts/declines.","commonSituations":"CI pipelines and Docker containers where no one can answer the prompt; pip-managed projects without uv; users intentionally declining auto-install to keep environments reproducible.","solutions":["Install the client manually: uv add spider-client (or pip install spider-client), then re-instantiate the tool.","Add spider-client to your project dependencies or Dockerfile so the import succeeds and the prompt never triggers.","In automation, always pre-install optional tool dependencies instead of relying on the interactive fallback."],"exampleFix":"# terminal\n# before: instantiation raises ImportError after declining prompt\n\n# after:\n#   pip install spider-client\nfrom crewai_tools import SpiderTool\ntool = SpiderTool(api_key=...)","handlingStrategy":"validation","validationCode":"import importlib.util\nif importlib.util.find_spec(\"spider\") is None:\n    raise RuntimeError(\"Run: pip install spider-client\")","typeGuard":null,"tryCatchPattern":"try:\n    tool = SpiderTool(api_key=...)\nexcept ImportError as e:\n    if \"spider-client\" in str(e):\n        subprocess.run([\"pip\", \"install\", \"spider-client\"], check=True)\n        tool = SpiderTool(api_key=...)","preventionTips":["Declare spider-client in your dependencies so the interactive prompt path is never taken.","Check find_spec('spider') (the module name differs from the package name spider-client) at startup."],"tags":["spider","dependency","installation","opt-out"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}