{"record":{"id":"a9cb32283bfba4fe","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"the-browserbase-module-is-not-installed","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.py","lineNumber":324,"sourceCode":"                self.logger.warning(\n                    f\"Failed to retrieve contents from the webpage at url: {source}\"\n                )\n        else:\n            loader_kwargs = {}\n\n            if self.node_config:\n                loader_kwargs = self.node_config.get(\"loader_kwargs\", {})\n\n            # If a global timeout is configured on the node and no loader-specific timeout\n            # was provided, propagate it to ChromiumLoader so it can apply the same limit.\n            if \"timeout\" not in loader_kwargs and self.timeout is not None:\n                loader_kwargs[\"timeout\"] = self.timeout\n\n            if self.browser_base:\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\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                if (","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/nodes/fetch_node.py#L306-L342","documentation":"When browser_base config is provided, handle_web_source imports scrapegraphai.docloaders.browser_base.browser_base_fetch; if that import fails (missing browserbase dependencies), this ImportError with install instructions is raised.","triggerScenarios":"Setting node_config with browser_base={'api_key':...,'session_id':...} while the browserbase package (and its deps) are not installed in the environment.","commonSituations":"Opting into BrowserBase fetching for the first time; CI/minimal installs lacking optional scraping deps; version drift where the docloader module moved.","solutions":["pip install browserbase (and check scrapegraphai optional extras for browserbase support)","Verify the import works: python -c 'from scrapegraphai.docloaders.browser_base import browser_base_fetch'","If BrowserBase is not needed, remove the browser_base config so the default fetcher is used"],"exampleFix":"# shell\npip install browserbase\n# config stays the same:\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\n\nif config.get('browser_base') and not browserbase_available():\n    config.pop('browser_base')  # or fail fast with a clear message","typeGuard":null,"tryCatchPattern":"try:\n    graph.run()\nexcept ImportError as e:\n    if 'browserbase' in str(e):\n        raise SystemExit('Install browserbase: pip install browserbase') from e\n    raise","preventionTips":["Verify optional fetcher deps at startup when using browser_base config","Keep optional scraping deps pinned in Docker/CI images"],"tags":["scrapegraphai","fetch-node","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"}