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
Hey there, @qkfm-97! I'm here to help you with any bugs, questions, or contributions you have for the Dify project. Let me know how I can assist you with the reported error.
I found a similar closed issue that might help you resolve the error you're encountering. The solution involves updating your Dify installation to a version that includes the fix from PR #12035. This fix modifies the ArrayFileVariable to properly inherit from ArrayVariable, allowing array files to be used correctly in iteration nodes.
If updating is not immediately possible, you can manually modify the file /app/api/core/variables/variables.py in your Docker container by changing:
After making this change, restart your Docker compose setup. Additionally, ensure you add a 'list filter' node to handle the array of files, as sys.files is an Array[File] type variable, not a single File type. This will help process the file array correctly in your workflow [1].
Self Checks
Dify version
0.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
this is the full error
invalid iterator value: value_type=<SegmentType.ARRAY_FILE: 'array[file]'> value=[File(dify_model_identity='dify__file', id=None, tenant_id='4d6d8447-60c2-4488-b6cd-e110602a1db5', type=<FileType.DOCUMENT: 'document'>, transfer_method=<FileTransferMethod.LOCAL_FILE: 'local_file'>, remote_url='', related_id='388974e9-df07-430b-91e8-b31aa058017a', filename='第01集知识点总结.pdf', extension='.pdf', mime_type='application/pdf', size=373038), File(dify_model_identity='dify__file', id=None, tenant_id='4d6d8447-60c2-4488-b6cd-e110602a1db5', type=<FileType.DOCUMENT: 'document'>, transfer_method=<FileTransferMethod.LOCAL_FILE: 'local_file'>, remote_url='', related_id='0f27b89f-bfaf-4460-8c37-c9e8a15f7a93', filename='第07集知识点总结.pdf', extension='.pdf', mime_type='application/pdf', size=509967)] id='80b1a8ed-9e84-470f-8ec5-69dac4a44951' name='filearr' description='' selector=['1735529468276', 'filearr'], please provide a list.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: