-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
I'm executing it according to the examples provided in the document, but it will report an error. #928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @gxin0426! How can I assist you today? I'm here to help you with bug fixes, answer questions, and guide you on contributing. To resolve the "INVALID_PROMPT_INPUT" error in LangChain when executing the Here are some steps you can take:
If the error persists, consider downgrading the pip install scrapegraphai==1.37.0 This approach should help you resolve the error and ensure that the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
After creating a virtual environment and running in version 1.37.0, following error pops up:
Thank you |
Please update to the new version |
Hi, @gxin0426. I'm Dosu, and I'm helping the Scrapegraph-ai team manage their backlog. I'm marking this issue as stale. Issue Summary:
Next Steps:
Thank you for your understanding and contribution! |
--- Executing Fetch Node ---
--- (Fetching HTML from: https://scrapegraphai.com/) ---
--- Executing ParseNode Node ---
--- Executing GenerateAnswer Node ---
Error during chain execution: 'Input to PromptTemplate is missing variables {'"content"'}. Expected: ['"content"', 'question'] Received: ['question']\nNote: if you intended {"content"} to be part of the string and not a variable, please escape it with double curly braces like: '{{"content"}}'.\nFor troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_PROMPT_INPUT '
Traceback (most recent call last):
File "/Users/xg/project/py-project/scrape/scrape2.py", line 21, in
result = smart_scraper_graph.run()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/scrapegraphai/graphs/smart_scraper_graph.py", line 296, in run
self.final_state, self.execution_info = self.graph.execute(inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/scrapegraphai/graphs/base_graph.py", line 358, in execute
return self._execute_standard(initial_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/scrapegraphai/graphs/base_graph.py", line 303, in _execute_standard
raise e
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/scrapegraphai/graphs/base_graph.py", line 276, in _execute_standard
result, node_exec_time, cb_data = self._execute_node(
^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/scrapegraphai/graphs/base_graph.py", line 200, in _execute_node
result = current_node.execute(state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/scrapegraphai/nodes/generate_answer_node.py", line 178, in execute
answer = self.invoke_with_timeout(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/scrapegraphai/nodes/generate_answer_node.py", line 79, in invoke_with_timeout
response = chain.invoke(inputs)
^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 3022, in invoke
input = context.run(step.invoke, input, config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/langchain_core/prompts/base.py", line 210, in invoke
return self._call_with_config(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 1922, in _call_with_config
context.run(
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 396, in call_func_with_variable_args
return func(input, **kwargs) # type: ignore[call-arg]
^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/langchain_core/prompts/base.py", line 184, in _format_prompt_with_error_handling
_inner_input = self._validate_input(inner_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xg/project/py-project/ENTER/envs/scrape/lib/python3.11/site-packages/langchain_core/prompts/base.py", line 178, in _validate_input
raise KeyError(
KeyError: 'Input to PromptTemplate is missing variables {'"content"'}. Expected: ['"content"', 'question'] Received: ['question']\nNote: if you intended {"content"} to be part of the string and not a variable, please escape it with double curly braces like: '{{"content"}}'.\nFor troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_PROMPT_INPUT '
The text was updated successfully, but these errors were encountered: