mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Bug: DuckDuckGo Tool's "Translate" function fails with AttributeErro #493
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @averyavi on GitHub (Jul 28, 2025).
Self Checks
Dify version
1.7.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
1.Go to "Studio" and create a new "Workflow" app.
2.Add the DuckDuckGo Translate tool.
3.Connect the Start node's query to the text input of the DuckDuckGo node.
4.Optionally, set the to parameter.
5.Run the workflow with any text to translate (e.g., "hello world").
✔️ Expected Behavior
The DuckDuckGo node should execute the translate function and output the translated text.
❌ Actual Behavior
The node fails with a "Plugin error". The log shows the following AttributeError, specifically mentioning translate:
An error occurred in the plugin, please contact the author of duckduckgo for help, error type: AttributeError, error details: 'DDGS' object has no attribute 'translate'
@dosubot[bot] commented on GitHub (Jul 28, 2025):
Hi @averyavi! I'm Dosu and I’m helping the dify team.
The error happens because the DDGS object from the duckduckgo-search library does not have a translate method—this is not implemented in Dify core or official plugins. The DuckDuckGo Translate tool is not part of Dify’s open-source codebase, so this issue comes from a third-party or custom plugin that incorrectly assumes such a method exists. Upgrading the duckduckgo-search package (as discussed in issue langgenius/dify#12307) can fix some DuckDuckGo-related errors, but it won’t resolve this AttributeError since the translate method simply isn’t present in the library.
To resolve this, you’ll need to update your custom tool or plugin to use a supported translation API or tool. Dify’s workflow supports integrating other translation services (like Google Translate or DeepL) via API calls or plugins that are officially documented and maintained. If you need translation in your workflow, consider switching to one of those supported options.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
