dify icon indicating copy to clipboard operation
dify copied to clipboard

DuckDuckGo Search bug

Open zuco1111 opened this issue 10 months ago • 3 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

Version 0.15.3 (online version)

Cloud or Self Hosted

Cloud

Steps to reproduce

When I input "帮我查一下黄金价格", it can work normally. But when I input any other keywords, it can't work. It tips "Failed to invoke tool: _text_extract_json() keywords='帮我查一下今天上海天气' ValueError: subsection not found"

Image

Image

✔️ Expected Behavior

It can search normally.

Image

❌ Actual Behavior

It can't work. It tips "Failed to invoke tool: _text_extract_json() keywords='帮我查一下今天上海天气' ValueError: subsection not found"

Image

zuco1111 avatar Feb 18 '25 16:02 zuco1111

The error "ValueError: subsection not found" when using the DuckDuckGo search node in the Dify workflow is likely due to an incompatibility issue with the version of the DuckDuckGo search package being used. To resolve this, you should install duckduckgo-search version 7.2.1, which addresses this issue. Here are the steps to fix it:

  1. Access the Docker container:
    docker exec -it docker-api-1 /bin/bash
    
  2. Navigate to the Python packages directory:
    cd /app/api/.venv/lib/python3.12/site-packages
    
  3. Install duckduckgo-search version 7.2.1:
    pip install duckduckgo-search==7.2.1
    
  4. Restart the docker-api-1 container.

This should resolve the error and allow the DuckDuckGo search node to function correctly [1].

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

dosubot[bot] avatar Feb 18 '25 16:02 dosubot[bot]

The error "ValueError: subsection not found" when using the DuckDuckGo search node in the Dify workflow is likely due to an incompatibility issue with the version of the DuckDuckGo search package being used. To resolve this, you should install duckduckgo-search version 7.2.1, which addresses this issue. Here are the steps to fix it:

  1. Access the Docker container: docker exec -it docker-api-1 /bin/bash
  2. Navigate to the Python packages directory: cd /app/api/.venv/lib/python3.12/site-packages
  3. Install duckduckgo-search version 7.2.1: pip install duckduckgo-search==7.2.1
  4. Restart the docker-api-1 container.

This should resolve the error and allow the DuckDuckGo search node to function correctly [1].

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

I use online server (dify.ai). So I can't use this solution

zuco1111 avatar Feb 18 '25 16:02 zuco1111

@zuco1111 I faced the same issue a few days ago, but now it is working fine on my end. Was that the issue on DuckDuckGo side?

a-taka avatar Feb 22 '25 13:02 a-taka