Open fdb02983rhy opened 22 hours ago
The error message "TypeError: Object of type File is not JSON serializable" indicates that there is an attempt to serialize a File
object into JSON, which is not directly possible. This typically happens when a File
object is included in a data structure that is being converted to JSON, such as when using json.dumps()
.
To resolve this issue, you need to ensure that any File
objects are converted to a JSON-serializable format before attempting to serialize them. This could involve extracting relevant information from the File
object, such as its path, name, or content, and including only that information in the data structure being serialized.
In the context of the Dify platform, you might need to check the part of the code where process_data
is being prepared for serialization and ensure that it does not include non-serializable objects like File
. Instead, convert these objects to a format that can be serialized, such as a string or dictionary containing the necessary details.
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.11.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Use doc extractor to process a pptx with unstructured io
✔️ Expected Behavior
Process succefully
❌ Actual Behavior