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

Issue with File List Field in Workflow Type Application after Upgrade to 0.14.2 #12048

Closed
5 tasks done
xiandan-erizo opened this issue Dec 24, 2024 · 2 comments
Closed
5 tasks done
Assignees
Labels
🐞 bug Something isn't working

Comments

@xiandan-erizo
Copy link
Contributor

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

0.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I have encountered an error with the file list field in the workflow type application after upgrading to version 0.14.2. The error occurs at the iteration node and prevents the application from functioning correctly.

image
image

image

Error Message:

invalid iterator value: value_type=<SegmentType.ARRAY_FILE: 'array[file]'> value=[File(dify_model_identity='__dify__file__', id=None, tenant_id='62286568-a061-4bbb-838a-38fb6fb760cb', type=<FileType.IMAGE: 'image'>, transfer_method=<FileTransferMethod.LOCAL_FILE: 'local_file'>, remote_url='', related_id='d77100cb-1833-40f1-a657-91fa081f91fa', filename='1734066775771.png', extension='.png', mime_type='image/png', size=107605), File(dify_model_identity='__dify__file__', id=None, tenant_id='62286568-a061-4bbb-838a-38fb6fb760cb', type=<FileType.IMAGE: 'image'>, transfer_method=<FileTransferMethod.LOCAL_FILE: 'local_file'>, remote_url='', related_id='c07c7047-c34d-42f1-8504-24890f1e6fbb', filename='1111.jpg', extension='.jpg', mime_type='image/jpeg', size=266584)] id='3a0b5dd9-3cb4-40be-8d43-32ddec892f3c' name='attachments' description='' selector=['1734595526118', 'attachments'], please provide a list.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Copy link

dosubot bot commented Dec 24, 2024

To resolve the issue with the file list field in your Dify workflow application after upgrading to version 0.14.2, ensure that the file variable in the start node is correctly set to an Array[File] type. This setup is crucial for handling multiple files without encountering iterator errors.

Here's a step-by-step guide to configure it properly:

  1. Set the File Variable: Ensure that the file variable in the start node is configured as an Array[File]. This means it should be a list of files, not a single file.

  2. Add a List Operation Node: After the start node, include a list operation node. This node will process each file in the list, allowing you to filter and extract attributes such as file format type, file name, and size.

  3. Process Files Appropriately: Use the list operation node to direct different file types to their corresponding processing nodes. This setup will help manage various file formats effectively.

This configuration ensures that the iteration node can handle each file in the list correctly, preventing iterator errors and allowing for precise control over different file processing flows [1][2][3].

To continue talking to Dosu, mention @dosu.


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

@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 24, 2024
@crazywoola
Copy link
Member

Fixed in #12035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants