Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[BUG]Query Regarding DuckDuckGo Search API Version Compatibility Issues #357

Open
@decadeneo

Description

@decadeneo

Query Regarding DuckDuckGo Search API Version Compatibility Issues

Title: DuckDuckGo Search API Compatibility Issues Causing "keywords is mandatory" Error

Description:

I'm using theknowledge_storm library for knowledge retrieval, which integrates DuckDuckGo search functionality, but I'm encountering the following error:

duckduckgo_search.DDGS : INFO     : Error to search using html backend: keywords is mandatory  ...  duckduckgo_search.exceptions.DuckDuckGoSearchException: keywords is mandatory

From the error logs, it appears that the search request is not correctly passing the keyword parameter, ultimately leading to:

AttributeError: 'DuckDuckGoSearchException' object has no attribute 'message'

Environment Details:

  • Python Environment: Anaconda
  • Relevant Libraries:
    • knowledge_storm
    • duckduckgo_search

Observed Issues:

  1. The code attempts to useddgs.text() for searching.
  2. A deprecation warning appears:backend='api' is deprecated, using backend='auto'.
  3. Bothhtml andlite backends fail with the same error.
  4. The final exception thrown iskeywords is mandatory.

Questions:

  1. Version Compatibility: Could this be related to theduckduckgo_search library version? Which version is currently recommended?
  2. Backend Selection: Should I explicitly set the search backend? Which one is more stable (html,lite, orapi)?
  3. Error Handling Issue: Is the missingmessage attribute inDuckDuckGoSearchException a bug in the library or a usage problem?
  4. Alternative Solutions: Are there recommended configurations or alternative approaches to resolve this?

What I've Tried:

  • Verified that the query parameters are not empty.
  • Checked theduckduckgo_search documentation, but version differences make it unclear.

Any guidance on correct configuration or version compatibility would be greatly appreciated!

(If relevant, I'm running this in a Windows environment with Python 3.x.)


Additional Notes:

  • If there’s a known workaround or a more stable fork ofduckduckgo_search, please suggest it.
  • Should I consider using an alternative search API (e.g., SerpAPI, Google Custom Search) instead?

Thanks in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp