Uploading a docx file to the knowledge will result in an error. #6199

Closed
opened 2026-02-21 18:14:31 -05:00 by yindo · 2 comments
Owner

Originally created by @kkjinping on GitHub (Oct 21, 2024).

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.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Uploading a docx file to the knowledge will result in an error:

__init__() missing 1 required keyword-only argument: 'created_by_role'

✔️ Expected Behavior

no error

Actual Behavior

error

Originally created by @kkjinping on GitHub (Oct 21, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.10.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Uploading a docx file to the knowledge will result in an error: ``` __init__() missing 1 required keyword-only argument: 'created_by_role' ``` ### ✔️ Expected Behavior no error ### ❌ Actual Behavior error
yindo added the 🐞 bug label 2026-02-21 18:14:31 -05:00
yindo closed this issue 2026-02-21 18:14:31 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 21, 2024):

The error you're encountering, __init__() missing 1 required keyword-only argument: 'created_by_role', occurs in the __init__ method of the WorkflowNodeExecution class. This error indicates that the created_by_role argument is not being provided when an instance of this class is being created, and it is a required argument [1].

The created_by_role argument is used to specify the role of the creator, which can either be an 'account' (referring to a console account) or an 'end_user' [2].

To resolve this issue, ensure that when creating an instance of the WorkflowNodeExecution class, you provide the created_by_role argument with an appropriate value ('account' or 'end_user').

Additionally, there is a recent commit related to the created_by_role argument, which adds this column to certain tables with a default value of 'end_user' [3]. This might be relevant if your database schema is not up-to-date with the latest migrations.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 21, 2024): <!-- Answer --> The error you're encountering, `__init__() missing 1 required keyword-only argument: 'created_by_role'`, occurs in the `__init__` method of the `WorkflowNodeExecution` class. This error indicates that the `created_by_role` argument is not being provided when an instance of this class is being created, and it is a required argument <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/models/model.py)</sup>. The `created_by_role` argument is used to specify the role of the creator, which can either be an 'account' (referring to a console account) or an 'end_user' <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/models/workflow.py)</sup>. To resolve this issue, ensure that when creating an instance of the `WorkflowNodeExecution` class, you provide the `created_by_role` argument with an appropriate value ('account' or 'end_user'). Additionally, there is a recent commit related to the `created_by_role` argument, which adds this column to certain tables with a default value of `'end_user'` <sup>[[3]](https://github.com/langgenius/dify/blob/main/api/migrations/versions/9f4e3427ea84_add_created_by_role.py)</sup>. This might be relevant if your database schema is not up-to-date with the latest migrations. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Oct 22, 2024):

https://github.com/langgenius/dify/pull/9607

@crazywoola commented on GitHub (Oct 22, 2024): https://github.com/langgenius/dify/pull/9607
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6199