Scrapegraph-ai icon indicating copy to clipboard operation
Scrapegraph-ai copied to clipboard

SmartScraperGraph: smart_scraper_graph.run() 'FetchNode' object has no attribute 'update_state'

Open mpilioun opened this issue 2 years ago • 3 comments

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'

mpilioun avatar Oct 10 '24 09:10 mpilioun

hi use https://adrinabeach.com instead

VinciGit00 avatar Oct 10 '24 09:10 VinciGit00

btw i Will update the fetch node, thank u

VinciGit00 avatar Oct 10 '24 09:10 VinciGit00

please update to the new version

VinciGit00 avatar Oct 10 '24 11:10 VinciGit00