{"record":{"id":"7361f872a972887e","repo":"crewAIInc/crewAI","slug":"hyperbrowser-package-not-found-please-run-pip","errorCode":null,"errorMessage":"`hyperbrowser` package not found, please run `pip install hyperbrowser`","messagePattern":"`hyperbrowser` package not found, please run `pip install hyperbrowser`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/hyperbrowser_load_tool/hyperbrowser_load_tool.py","lineNumber":58,"sourceCode":"                name=\"HYPERBROWSER_API_KEY\",\n                description=\"API key for Hyperbrowser services\",\n                required=False,\n            ),\n        ]\n    )\n\n    def __init__(self, api_key: str | None = None, **kwargs: Any) -> None:\n        super().__init__(**kwargs)\n        self.api_key = api_key or os.getenv(\"HYPERBROWSER_API_KEY\")\n        if not api_key:\n            raise ValueError(\n                \"`api_key` is required, please set the `HYPERBROWSER_API_KEY` environment variable or pass it directly\"\n            )\n\n        try:\n            from hyperbrowser import Hyperbrowser  # type: ignore[import-untyped]\n        except ImportError as e:\n            raise ImportError(\n                \"`hyperbrowser` package not found, please run `pip install hyperbrowser`\"\n            ) from e\n\n        if not self.api_key:\n            raise ValueError(\n                \"HYPERBROWSER_API_KEY is not set. Please provide it either via the constructor with the `api_key` argument or by setting the HYPERBROWSER_API_KEY environment variable.\"\n            )\n\n        self.hyperbrowser = Hyperbrowser(api_key=self.api_key)\n\n    @staticmethod\n    def _prepare_params(params: dict[str, Any]) -> dict[str, Any]:\n        \"\"\"Prepare session and scrape options parameters.\"\"\"\n        try:\n            from hyperbrowser.models.scrape import (  # type: ignore[import-untyped]\n                ScrapeOptions,\n            )\n            from hyperbrowser.models.session import (  # type: ignore[import-untyped]","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/hyperbrowser_load_tool/hyperbrowser_load_tool.py#L40-L76","documentation":"ImportError raised in HyperbrowserLoadTool.__init__ when the 'hyperbrowser' SDK package cannot be imported, with the original ImportError chained. The tool needs the SDK to construct its client; unlike some other crewai-tools it does not offer an interactive install, it just names the pip command.","triggerScenarios":"Instantiating HyperbrowserLoadTool (with a valid api_key) in an environment where 'hyperbrowser' is not installed or is broken (e.g. a partially installed dist, Python version incompatibility raising ImportError).","commonSituations":"crewai-tools installed without the hyperbrowser extra; fresh virtualenvs; CI images missing optional dependencies; Python upgrades breaking an installed SDK.","solutions":["Run: pip install hyperbrowser.","Add hyperbrowser to your project dependencies for CI and teammates.","Verify: python -c \"import hyperbrowser\"."],"exampleFix":"# before: ImportError\n# after: shell\n#   pip install hyperbrowser\ntool = HyperbrowserLoadTool(api_key=HB_KEY)","handlingStrategy":"try-catch","validationCode":"try:\n    import hyperbrowser  # noqa: F401\nexcept ImportError:\n    raise SystemExit('pip install hyperbrowser')","typeGuard":null,"tryCatchPattern":"try:\n    tool = HyperbrowserLoadTool(api_key=KEY)\nexcept ImportError as e:\n    if 'hyperbrowser' in str(e):\n        raise SystemExit('install hyperbrowser before use') from e\n    raise","preventionTips":["Add hyperbrowser to project dependencies.","Probe optional imports at startup and fail fast with the install command."],"tags":["hyperbrowser","import-error","dependency","optional-deps"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}