Closed sunejay closed 1 month ago
When I run this code
`from scrapegraphai.graphs import SmartScraperGraph import nest_asyncio
graph_config = { "llm": { "model": "ollama/mistral", "temperature": 0, "format": "json", # Ollama needs the format to be specified explicitly "base_url": "http://localhost:11434", # set Ollama URL }, "embeddings": { "model": "ollama/nomic-embed-text", "base_url": "http://localhost:11434", # set Ollama URL } } smart_scraper_graph = SmartScraperGraph( prompt="List me all items",
source="https://www.url.com", config=graph_config
)
nest_asyncio.apply()
result = smart_scraper_graph.run() print(result) `
I got the following error
VERSIONS Ubuntu - 20.04 Scrapegraphai - 1.7.4
have you tried to run without asyncio?
hi please update to the new version
When I run this code
`from scrapegraphai.graphs import SmartScraperGraph import nest_asyncio
graph_config = { "llm": { "model": "ollama/mistral", "temperature": 0, "format": "json", # Ollama needs the format to be specified explicitly "base_url": "http://localhost:11434", # set Ollama URL }, "embeddings": { "model": "ollama/nomic-embed-text", "base_url": "http://localhost:11434", # set Ollama URL } } smart_scraper_graph = SmartScraperGraph( prompt="List me all items",
also accepts a string with the already downloaded HTML code
)
nest_asyncio.apply()
result = smart_scraper_graph.run() print(result) `
I got the following error
VERSIONS Ubuntu - 20.04 Scrapegraphai - 1.7.4