serply credential check query might return empty records #7749

Closed
opened 2026-02-21 18:22:10 -05:00 by yindo · 1 comment
Owner

Originally created by @rayshaw001 on GitHub (Jan 15, 2025).

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).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

v0.15.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

image

✔️ Expected Behavior

save serply.io API key successfully

Actual Behavior

save serply.io API key failed due to serply credential check query returns empty record.

Originally created by @rayshaw001 on GitHub (Jan 15, 2025). ### 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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version v0.15.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce ![image](https://github.com/user-attachments/assets/e99da3cc-62f5-4c96-8e3c-3b9a70a9e96a) ### ✔️ Expected Behavior save serply.io API key successfully ### ❌ Actual Behavior save serply.io API key failed due to serply credential check query returns empty record.
yindo added the 🐞 bug label 2026-02-21 18:22:10 -05:00
yindo closed this issue 2026-02-21 18:22:10 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 15, 2025):

Hey @rayshaw001! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's tackle this together!

The issue of the Serply credential check query returning empty records could be due to several reasons:

  1. No Articles Found: The query might not match any articles, leading to an empty response. This is checked in the parse_results method, which raises a ValueError if the articles list is empty [1].

  2. Incorrect Query Parameters: Ensure that the query parameters such as q (query), hl (language), gl (geolocation), and num (number of results) are set correctly, as incorrect parameters can lead to no matching records.

  3. API Key Issues: Verify that the API key is correct and properly stored in the self.runtime.credentials dictionary under the key "serply_api_key" [1].

  4. Network or API Issues: There might be network issues or problems with the Serply API itself that prevent data from being retrieved.

  5. Location Restrictions: The X-Proxy-Location header might restrict search results based on the specified location, potentially leading to no results if the location is too restrictive.

Review these aspects to troubleshoot the issue further.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 15, 2025): <!-- Greeting --> Hey @rayshaw001! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's tackle this together! <!-- Answer --> The issue of the Serply credential check query returning empty records could be due to several reasons: 1. **No Articles Found**: The query might not match any articles, leading to an empty response. This is checked in the `parse_results` method, which raises a `ValueError` if the `articles` list is empty <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/websearch/tools/scholar_search.py)</sup>. 2. **Incorrect Query Parameters**: Ensure that the query parameters such as `q` (query), `hl` (language), `gl` (geolocation), and `num` (number of results) are set correctly, as incorrect parameters can lead to no matching records. 3. **API Key Issues**: Verify that the API key is correct and properly stored in the `self.runtime.credentials` dictionary under the key `"serply_api_key"` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/websearch/tools/scholar_search.py)</sup>. 4. **Network or API Issues**: There might be network issues or problems with the Serply API itself that prevent data from being retrieved. 5. **Location Restrictions**: The `X-Proxy-Location` header might restrict search results based on the specified location, potentially leading to no results if the location is too restrictive. Review these aspects to troubleshoot the issue further. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/9adc0eff-443c-4ce2-bccd-64c47e91ea04?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9adc0eff-443c-4ce2-bccd-64c47e91ea04?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9adc0eff-443c-4ce2-bccd-64c47e91ea04?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9adc0eff-443c-4ce2-bccd-64c47e91ea04?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9adc0eff-443c-4ce2-bccd-64c47e91ea04?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/9adc0eff-443c-4ce2-bccd-64c47e91ea04?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7749