Skip to content

Param reattempt on config error #986

Open
@LordDangerous

Description

@LordDangerous

Error when using reattempt parameter on config.

To Reproduce
Steps to reproduce the behavior:
graph_config = {
"llm": {
"model_instance": llm_model_instance,
"model_tokens": 128000,
},
"verbose": True,
"headless": True,
"reattempt": True
}
smart_scraper_graph = SmartScraperGraph(
prompt=prompt,
config=graph_config,
schema=None,
source="https://perinim.github.io/"
)
result = smart_scraper_graph.run()

Traceback (most recent call last):
File "C:\Users\malsina\Documents\projects\sql_crew.venv\Lib\site-packages\scrapegraphai\graphs\base_graph.py", line 117, in _set_conditional_node_edges
node.false_node_name = outgoing_edges[1][1].node_name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'node_name'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\malsina\Documents\projects\sql_crew\test_web_scraping.py", line 59, in
smart_scraper_graph = SmartScraperGraph(
^^^^^^^^^^^^^^^^^^
File "C:\Users\malsina\Documents\projects\sql_crew.venv\Lib\site-packages\scrapegraphai\graphs\smart_scraper_graph.py", line 61, in init
super().init(prompt, config, source, schema)
File "C:\Users\malsina\Documents\projects\sql_crew.venv\Lib\site-packages\scrapegraphai\graphs\abstract_graph.py", line 76, in init
self.graph = self._create_graph()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\malsina\Documents\projects\sql_crew.venv\Lib\site-packages\scrapegraphai\graphs\smart_scraper_graph.py", line 274, in _create_graph
return BaseGraph(
^^^^^^^^^^
File "C:\Users\malsina\Documents\projects\sql_crew.venv\Lib\site-packages\scrapegraphai\graphs\base_graph.py", line 78, in init
self._set_conditional_node_edges()
File "C:\Users\malsina\Documents\projects\sql_crew.venv\Lib\site-packages\scrapegraphai\graphs\base_graph.py", line 122, in _set_conditional_node_edges
raise ValueError(
ValueError: Failed to set false_node_name for ConditionalNode 'ConditionalNode'

I saw this implemented here: eaa83ed

Am i missing something?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions