Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The first time setting up Brave Search and entering the API key, an error occurs when clicking "Save." #11735

Open
5 tasks done
kevintsai1202 opened this issue Dec 17, 2024 · 1 comment
Assignees
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report

Comments

@kevintsai1202
Copy link

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.14

Cloud or Self Hosted

Cloud

Steps to reproduce

The first time setting up Brave Search and entering the API key, an error occurs when clicking "Save."
圖片

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added cloud When the version is cloud and it is a bug report 🐞 bug Something isn't working labels Dec 17, 2024
Copy link

dosubot bot commented Dec 17, 2024

The error message "object of type 'NoneType' has no len()" suggests that there might be an issue with how the API key or another input is being processed or validated. This typically occurs when a function expects a non-null value but receives None instead.

Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  1. Check Input Fields: Ensure that all required fields, especially the API key, are filled in correctly. An empty or improperly formatted input might be causing the error.

  2. Review the 'Save' Function: The 'Save' function should handle input validation and storage. It should check if the input is empty and display an error message if so. Make sure this logic is correctly implemented and that the input is not being set to None inadvertently [1].

  3. Debugging: Add logging or print statements in the code where the API key is processed to verify that the input is being correctly captured and is not None.

  4. Code Review: Look into the specific part of the codebase that handles the interaction with the Brave Search API, such as the BraveSearchWrapper class in brave_search.py, to ensure that the API key is being used correctly [2].

If these steps do not resolve the issue, further investigation into the specific implementation details of the 'Save' function and related code might be necessary.

To continue talking to Dosu, mention @dosu.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report
Projects
None yet
Development

No branches or pull requests

2 participants