smart_scraper_graph = SmartScraperGraph(
prompt="Find me a contact email from this website",
source=website,
config=graph_config
)
result = smart_scraper_graph.run()
print(json.dumps(result, indent=4))
Output:
--- Executing Fetch Node ---
--- (Fetching HTML from: www.adrinabeach.com) ---
AttributeError: 'FetchNode' object has no attribute 'update_state'
Describe the bug I have created a poetry shell env so all dependencies were installed there. Below is my code:
import os import json from dotenv import load_dotenv from scrapegraphai.graphs import SmartScraperGraph
LOAD VARIABLES
load_dotenv() OPENAI_API_KEY=os.environ["OPENAI_API_KEY"]
Define the configuration for the scraping pipeline
graph_config = { "llm": { "api_key": OPENAI_API_KEY, "model": "openai/gpt-4o-mini", }, "verbose": True, "headless": False, }
website="www.adrinabeach.com"
smart_scraper_graph = SmartScraperGraph( prompt="Find me a contact email from this website", source=website, config=graph_config ) result = smart_scraper_graph.run() print(json.dumps(result, indent=4))
Output: --- Executing Fetch Node --- --- (Fetching HTML from: www.adrinabeach.com) --- AttributeError: 'FetchNode' object has no attribute 'update_state'