Skip to content

ModuleNotFoundError: No module named 'stagehand.sync' #118

Closed
@parameterEstimation

Description

@parameterEstimation

Using sample script from https://pypi.org/project/stagehand-py/

import os
from stagehand.sync import Stagehand
from stagehand import StagehandConfig
from dotenv import load_dotenv

load_dotenv()

def main():
    # Configure Stagehand
    config = StagehandConfig(
        env="BROWSERBASE",
        api_key=os.getenv("BROWSERBASE_API_KEY"),
        project_id=os.getenv("BROWSERBASE_PROJECT_ID"),
        model_name="gpt-4o",
        model_client_options={"apiKey": os.getenv("MODEL_API_KEY")}
    )

Error

Traceback (most recent call last):
File ".../demo/test_visit_google.py", line 2, in
from stagehand.sync import Stagehand
ModuleNotFoundError: No module named 'stagehand.sync'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions