{"record":{"id":"b4912f38bb1772e6","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"the-browserbase-module-is-not-installed-b4912f","errorCode":null,"errorMessage":"The browserbase module is not installed.\n                                    Please install it using `pip install browserbase`.","messagePattern":"The browserbase module is not installed\\.\n                                    Please install it using `pip install browserbase`\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"scrapegraphai/nodes/fetch_node_level_k.py","lineNumber":121,"sourceCode":"\n    def fetch_content(self, source: str, loader_kwargs) -> Optional[str]:\n        \"\"\"\n        Fetches the HTML content of a given source URL.\n\n        Args:\n            source (str): The URL to fetch content from.\n            loader_kwargs (dict): Additional arguments for the content loader.\n\n        Returns:\n            Optional[str]: The fetched HTML content or None if fetching failed.\n        \"\"\"\n        self.logger.info(f\"--- (Fetching HTML from: {source}) ---\")\n\n        if self.browser_base is not None:\n            try:\n                from ..docloaders.browser_base import browser_base_fetch\n            except ImportError:\n                raise ImportError(\n                    \"\"\"The browserbase module is not installed.\n                                    Please install it using `pip install browserbase`.\"\"\"\n                )\n\n            data = browser_base_fetch(\n                self.browser_base.get(\"api_key\"),\n                self.browser_base.get(\"project_id\"),\n                [source],\n            )\n            document = [\n                Document(page_content=content, metadata={\"source\": source})\n                for content in data\n            ]\n        elif self.scrape_do:\n            from ..docloaders.scrape_do import scrape_do_fetch\n\n            data = scrape_do_fetch(self.scrape_do.get(\"api_key\"), source)\n            document = [Document(page_content=data, metadata={\"source\": source})]","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/nodes/fetch_node_level_k.py#L103-L139","documentation":"FetchNodeLevelK.fetch_content uses BrowserBase when browser_base config is set; the failure to import scrapegraphai.docloaders.browser_base.browser_base_fetch raises this ImportError with install instructions — same family as error 55 but on the level-k crawling node.","triggerScenarios":"Configuring FetchNodeLevelK (deeplevel graph) with browser_base while the browserbase package/deps are missing.","commonSituations":"Running DeepScraperGraph/level-k crawls with BrowserBase for the first time in a minimal install; Docker images without optional deps.","solutions":["pip install browserbase and verify the docloader import","Or remove browser_base from node config to fall back to the standard fetch path","Reinstall/refresh dependencies: uv sync or pip install -U scrapegraphai[browserbase] if the extra exists"],"exampleFix":"# shell: before -> raises\npip install browserbase\n# after: config unchanged\nnode_config = {'browser_base': {'api_key': '...', 'session_id': '...'}}","handlingStrategy":"validation","validationCode":"def browserbase_available() -> bool:\n    try:\n        from scrapegraphai.docloaders.browser_base import browser_base_fetch  # noqa\n        return True\n    except ImportError:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    graph.run()\nexcept ImportError as e:\n    if 'browserbase' in str(e):\n        subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'browserbase'])\n    else:\n        raise","preventionTips":["Install and verify browserbase before configuring browser_base on level-k crawls","Fail fast on missing optional deps at app startup"],"tags":["scrapegraphai","fetch-node-level-k","browserbase","missing-dependency"],"backgroundTag":"missing-optional-dependency","analyzedSha":"532dfffbf6ee823a6c9cf8cfedc24a93bf026780","analyzedAt":"2026-08-28T15:19:38.821Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}