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 "Out of range float values are not JSON compliant: nan" typically occurs when a JSON serialization process encounters a NaN (Not a Number) value, which is not supported by the JSON standard. This issue can arise during the document processing or indexing phase in Dify.
To address this issue, you can try the following steps:
Check Document Content: Ensure that the document does not contain any invalid numerical values that could be interpreted as NaN. This might involve reviewing the document for any unusual data entries or calculations.
Review Code for JSON Serialization: If you have access to the codebase, look for any parts of the code where float values are processed or converted to JSON. Ensure that these values are validated or converted to a JSON-compliant format before serialization.
Error Handling: Implement error handling to catch and manage NaN values before they are serialized. This can involve setting default values or skipping problematic entries.
Update Dependencies: Ensure that all dependencies and libraries used for JSON processing are up to date, as newer versions might handle such cases more gracefully.
If the issue persists, you might need to delve deeper into the specific part of the codebase where JSON serialization occurs, although the exact location of this logic in the Dify codebase is not specified in the available information.
Self Checks
Dify version
0.13.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I encountered this error while uploading the document to the knowledge base:Out of range float values are not JSON compliant: nan
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: