Parameter Extractor not working (Query not found) #4257

Closed
opened 2026-02-21 18:05:25 -05:00 by yindo · 4 comments
Owner

Originally created by @AndyMik90 on GitHub (Jun 25, 2024).

Originally assigned to: @takatost on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.11

Cloud or Self Hosted

Cloud

Steps to reproduce

CleanShot 2024-06-25 at 12 00 34

Use the Paramater Extractor

✔️ Expected Behavior

Worked in previous versions

Actual Behavior

Gives now has the error "Node Parameter Extractor run failed: Query not found"

Originally created by @AndyMik90 on GitHub (Jun 25, 2024). Originally assigned to: @takatost on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.11 ### Cloud or Self Hosted Cloud ### Steps to reproduce ![CleanShot 2024-06-25 at 12 00 34](https://github.com/langgenius/dify/assets/119136210/d975f401-cba8-48e8-9e4d-d52964040128) Use the Paramater Extractor ### ✔️ Expected Behavior Worked in previous versions ### ❌ Actual Behavior Gives now has the error "Node Parameter Extractor run failed: Query not found"
yindo added the 🐞 bug label 2026-02-21 18:05:25 -05:00
yindo closed this issue 2026-02-21 18:05:26 -05:00
Author
Owner

@AndyMik90 commented on GitHub (Jun 25, 2024):

@takatost maybe related to the commit https://github.com/langgenius/dify/commit/4a031de0d9932aa0dde354fad47b4dbbfbe9d79a ?

@AndyMik90 commented on GitHub (Jun 25, 2024): @takatost maybe related to the commit https://github.com/langgenius/dify/commit/4a031de0d9932aa0dde354fad47b4dbbfbe9d79a ?
Author
Owner

@dosubot[bot] commented on GitHub (Jun 25, 2024):

The "Query not found" error in the Parameter Extractor for version 0.6.11 occurs when the query variable is not found in the variable_pool. This issue is raised in the following code snippet:

query = variable_pool.get_variable_value(node_data.query)
if not query:
    raise ValueError("Query not found")

This indicates that if the query is not present in the variable_pool, a ValueError with the message "Query not found" will be raised [1].

The commit "4a031de" by "takatost" on June 24, 2024, introduced changes to the variable_pool handling, specifically fetching the query and memory from the variable_pool:

  1. Fetching Query from variable_pool:

    query = variable_pool.get_variable_value(node_data.query)
    if not query:
        raise ValueError("Query not found")
    
  2. Fetching Memory from variable_pool:

    memory = self._fetch_memory(node_data.memory, variable_pool, model_instance)
    

These changes ensure that the query and memory are dynamically fetched from the variable_pool during the node's execution, which might be causing the issue if the query is not correctly set in the variable_pool [1].

To resolve this issue, ensure that the query variable is correctly set in the variable_pool before the Parameter Extractor node is executed.

@takatost, this seems to be a complex issue that could benefit from your expertise.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 25, 2024): <!-- Answer --> The "Query not found" error in the Parameter Extractor for version 0.6.11 occurs when the `query` variable is not found in the `variable_pool`. This issue is raised in the following code snippet: ```python query = variable_pool.get_variable_value(node_data.query) if not query: raise ValueError("Query not found") ``` This indicates that if the `query` is not present in the `variable_pool`, a `ValueError` with the message "Query not found" will be raised <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/parameter_extractor/parameter_extractor_node.py)</sup>. The commit "4a031de" by "takatost" on June 24, 2024, introduced changes to the `variable_pool` handling, specifically fetching the query and memory from the `variable_pool`: 1. **Fetching Query from `variable_pool`:** ```python query = variable_pool.get_variable_value(node_data.query) if not query: raise ValueError("Query not found") ``` 2. **Fetching Memory from `variable_pool`:** ```python memory = self._fetch_memory(node_data.memory, variable_pool, model_instance) ``` These changes ensure that the query and memory are dynamically fetched from the `variable_pool` during the node's execution, which might be causing the issue if the `query` is not correctly set in the `variable_pool` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/parameter_extractor/parameter_extractor_node.py)</sup>. To resolve this issue, ensure that the `query` variable is correctly set in the `variable_pool` before the Parameter Extractor node is executed. @takatost, this seems to be a complex issue that could benefit from your expertise. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@takatost commented on GitHub (Jun 25, 2024):

This error message is a bit misleading, it's actually checking the content of the Input variable configured. Could you please check if there is a value for this Input variable in the Log?

@takatost commented on GitHub (Jun 25, 2024): This error message is a bit misleading, it's actually checking the content of the Input variable configured. Could you please check if there is a value for this Input variable in the Log?
Author
Owner

@AndyMik90 commented on GitHub (Jun 25, 2024):

I see. Somebody decided that this was a good change. There is no way to use the information from the Google search tool downstream, as it only outputs text.
CleanShot 2024-06-25 at 17 37 03

@AndyMik90 commented on GitHub (Jun 25, 2024): I see. Somebody decided that this was a good change. There is no way to use the information from the Google search tool downstream, as it only outputs text. ![CleanShot 2024-06-25 at 17 37 03](https://github.com/langgenius/dify/assets/119136210/c61522fd-876b-4c27-ae65-91594670d0a9)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4257