You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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].
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.
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.
Self Checks
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
The text was updated successfully, but these errors were encountered: