Replies: 1 comment
-
please update to the new version |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
when I try to run to result = xml_scraper_graph.run() from the xml_scraper_multi_graph_groq in example. I got always error paring input for MergeAnsers:No state keys...
Full error info in beneath:
ValueError Traceback (most recent call last)
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/nodes/base_node.py:111, in BaseNode.get_input_keys(self, state)
110 try:
--> 111 input_keys = self._parse_input_keys(state, self.input)
112 self._validate_input_keys(input_keys)
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/nodes/base_node.py:234, in BaseNode._parse_input_keys(self, state, expression)
233 if not result:
--> 234 raise ValueError("No state keys matched the expression.")
236 # Remove redundant state keys from the result, without changing their order
ValueError: No state keys matched the expression.
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
Cell In[9], line 1
----> 1 result = multiple_search_graph.run()
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/graphs/json_scraper_multi_graph.py:119, in JSONScraperMultiGraph.run(self)
112 """
113 Executes the web scraping and searching process.
114
115 Returns:
116 str: The answer to the prompt.
117 """
118 inputs = {"user_prompt": self.prompt, "jsons": self.source}
--> 119 self.final_state, self.execution_info = self.graph.execute(inputs)
121 return self.final_state.get("answer", "No answer found.")
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/graphs/base_graph.py:260, in BaseGraph.execute(self, initial_state)
258 return (result["_state"], [])
259 else:
--> 260 return self._execute_standard(initial_state)
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/graphs/base_graph.py:181, in BaseGraph._execute_standard(self, initial_state)
168 graph_execution_time = time.time() - start_time
169 log_graph_execution(
170 graph_name=self.graph_name,
171 source=source,
(...)
179 exception=str(e)
180 )
--> 181 raise e
182 node_exec_time = time.time() - curr_time
183 total_exec_time += node_exec_time
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/graphs/base_graph.py:164, in BaseGraph._execute_standard(self, initial_state)
162 with get_openai_callback() as cb:
163 try:
--> 164 result = current_node.execute(state)
165 except Exception as e:
166 error_node = current_node.node_name
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/nodes/merge_answers_node.py:69, in MergeAnswersNode.execute(self, state)
66 self.logger.info(f"--- Executing {self.node_name} Node ---")
68 # Interpret input keys based on the provided input expression
---> 69 input_keys = self.get_input_keys(state)
71 # Fetching data from the state based on the input keys
72 input_data = [state[key] for key in input_keys]
File /opt/anaconda3/envs/langraph/lib/python3.12/site-packages/scrapegraphai/nodes/base_node.py:115, in BaseNode.get_input_keys(self, state)
113 return input_keys
114 except ValueError as e:
--> 115 raise ValueError(f"Error parsing input keys for {self.node_name}: {str(e)}")
ValueError: Error parsing input keys for MergeAnswers: No state keys matched the expression.
Beta Was this translation helpful? Give feedback.
All reactions