Run failed: Node DuckDuckGo search run failed: Failed to invoke tool: local variable 'snippets' referenced before assignment #1720

Closed
opened 2026-02-21 17:37:04 -05:00 by yindo · 0 comments
Owner

Originally created by @QIN2DIM on GitHub (Apr 2, 2024).

Originally assigned to: @crazywoola on GitHub.

Self Checks

  • 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

langgenius/dify-api:0.6.0-preview-workflow.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

图片

✔️ Expected Behavior

class DuckDuckGoSearchResult:
    title: str
    href: str
    body: str


# Expected schema
class DuckDuckGoSearchResponse:
    results: List[DuckDuckGoSearchResult]

Actual Behavior

duckduckgo-search 组件漏洞,ddgs.AnyMethod 返回空结果。

import asyncio
from asyncio import WindowsSelectorEventLoopPolicy

asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())

# v5.1.0
from duckduckgo_search import DDGS


async def main():
    with DDGS(proxies="http://127.0.0.1:2081") as ddgs:
        print(ddgs.text("Chinese", max_results=1))


if __name__ == '__main__':
    asyncio.run(main())

Originally created by @QIN2DIM on GitHub (Apr 2, 2024). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [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] Pleas do not modify this template :) and fill in all the required fields. ### Dify version langgenius/dify-api:0.6.0-preview-workflow.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![图片](https://github.com/langgenius/dify/assets/62018067/dac34d5c-e6a8-4e9c-9c06-103dbccb8f34) ### ✔️ Expected Behavior ```python class DuckDuckGoSearchResult: title: str href: str body: str # Expected schema class DuckDuckGoSearchResponse: results: List[DuckDuckGoSearchResult] ``` ### ❌ Actual Behavior duckduckgo-search 组件漏洞,ddgs.AnyMethod 返回空结果。 ```python import asyncio from asyncio import WindowsSelectorEventLoopPolicy asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy()) # v5.1.0 from duckduckgo_search import DDGS async def main(): with DDGS(proxies="http://127.0.0.1:2081") as ddgs: print(ddgs.text("Chinese", max_results=1)) if __name__ == '__main__': asyncio.run(main()) ```
yindo added the 🐞 bug label 2026-02-21 17:37:04 -05:00
yindo closed this issue 2026-02-21 17:37:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1720