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

`embedder_model` AttributeError in `/examples/openai/deep_scraper_openai.py`

Open ajt opened this issue 6 months ago • 1 comments

Describe the bug When running the OpenAI Deep Scraper example located at examples/openai/deep_scraper_openai.py, I get the error:

Traceback (most recent call last):
  File "/Users/ajt/Projects/scrapegraph_playground/openai/deep_scraper_openai.py", line 37, in <module>
    deep_scraper_graph = DeepScraperGraph(
                         ^^^^^^^^^^^^^^^^^
  File "/Users/ajt/.virtualenvs/scrapegraph-ai/lib/python3.12/site-packages/scrapegraphai/graphs/deep_scraper_graph.py", line 62, in __init__
    super().__init__(prompt, config, source, schema)
  File "/Users/ajt/.virtualenvs/scrapegraph-ai/lib/python3.12/site-packages/scrapegraphai/graphs/abstract_graph.py", line 70, in __init__
    self.graph = self._create_graph()
                 ^^^^^^^^^^^^^^^^^^^^
  File "/Users/ajt/.virtualenvs/scrapegraph-ai/lib/python3.12/site-packages/scrapegraphai/graphs/deep_scraper_graph.py", line 160, in _create_graph
    base_graph = self._create_repeated_graph()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ajt/.virtualenvs/scrapegraph-ai/lib/python3.12/site-packages/scrapegraphai/graphs/deep_scraper_graph.py", line 90, in _create_repeated_graph
    "embedder_model": self.embedder_model
                      ^^^^^^^^^^^^^^^^^^^
AttributeError: 'DeepScraperGraph' object has no attribute 'embedder_model'

To Reproduce Steps to reproduce the behavior: Fresh install on macOS. Execute the script

Expected behavior Expecting the script to execute without errors.

Desktop (please complete the following information):

  • OS: MacOS 13.6.7
  • Browser chrome

Additional context I am sure that the embedder_model just needs to be set, but I am unsure how to do it.

ajt avatar Aug 13 '24 13:08 ajt