ScrapeGraphAI/Scrapegraph-ai · error · ImportError

The browserbase module is not installed. Please install it u

Error message

The browserbase module is not installed. Please install it using `pip install browserbase`.

What it means

RAGNode validates node_config['client_type'] and raises this ValueError when it is not one of the supported values: 'memory' (or None/absent, in-memory Qdrant), 'local_db' (persistent local storage), or 'image' (Qdrant server URL). Any other string is rejected before a client is constructed.

Source

Thrown at scrapegraphai/docloaders/browser_base.py:34

    """
    BrowserBase Fetch

    This module provides an interface to the BrowserBase API.

    Args:
        api_key (str): The API key provided by BrowserBase.
        project_id (str): The ID of the project on BrowserBase where you want to fetch data from.
        link (List[str]): The URLs or links that you want to fetch data from.
        text_content (bool): Whether to return only the text content (True) or the full HTML (False).
        async_mode (bool): Whether to run the function asynchronously (True) or synchronously (False).

    Returns:
        List[str]: The results of the loading operations.
    """
    try:
        from browserbase import Browserbase
    except ImportError:
        raise ImportError(
            "The browserbase module is not installed. Please install it using `pip install browserbase`."
        )

    # Initialize client with API key
    browserbase = Browserbase(api_key=api_key)

    # Create session with project ID
    session = browserbase.sessions.create(project_id=project_id)

    result = []

    async def _async_fetch_link(url):
        return await asyncio.to_thread(session.load, url, text_content=text_content)

    if async_mode:

        async def _async_browser_base_fetch():
            for url in link:

View on GitHub (pinned to 532dfffbf6)

Solutions

  1. Use one of the supported values: omit client_type or set 'memory', 'local_db', or 'image'.
  2. For a remote Qdrant server use client_type='image' (client connects to http://localhost:6333 by default).
  3. Check the installed version's RAGNode source/docs for newly supported client types.

Example fix

# before
config = {"client_type": "remote"}

# after
config = {"client_type": "image"}  # or "memory" / "local_db"
Defensive patterns

Strategy: type-guard

Validate before calling

VALID = {"memory", "local_db", "image", None}
if node_config.get("client_type") not in VALID:
    raise ValueError(f"client_type must be one of {VALID}")

Type guard

def is_valid_client_type(ct: str | None) -> bool:
    return ct in {"memory", "local_db", "image", None}

Try / catch

try:
    result = rag_graph.run()
except ValueError as e:
    if "client_type" in str(e):
        # correct client_type in config and retry
        ...

Prevention

When it happens

Trigger: Setting client_type to an unsupported value such as 'remote', 'cloud', 'server', or a typo like 'Memory' (case-sensitive) in the RAG node config.

Common situations: Assuming a 'cloud'/'remote' option exists for Qdrant Cloud; typos or wrong casing; copying config snippets from tutorials targeting a different library version.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of ScrapeGraphAI/Scrapegraph-ai@532dfffbf6 (2026-08-28). Data as JSON: /api/errors/48ef2ddef56e05e9. Report an issue: GitHub.