dify icon indicating copy to clipboard operation
dify copied to clipboard

Adding new doc to Notion binding KB causing "Process rule pre_processing_rules is required" error

Open zhongzishi opened this issue 9 months ago • 6 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  • hitting Add Pages button on a Notion binding KB
  • select a Notion doc from list then click on Save button
  • an error message "Process rule pre_processing_rules is required" shows

BTW, I don't see the same error while adding pages to a non-Notion-binding KB, the latter works good

Image

✔️ Expected Behavior

By clicking on the Save button, show pre-processing screen same as file-upload type of KB for doc pre_processing

❌ Actual Behavior

Showing an error message "Process rule pre_processing_rules is required"

zhongzishi avatar Mar 16 '25 19:03 zhongzishi

@zhongzishi Hello there! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve your issue.

The error message "Process rule pre_processing_rules is required" is triggered when the pre_processing_rules are not properly defined in the configuration. This is a required component of the process rule configuration in the Dify codebase, specifically in the api/services/dataset_service.py file. The error occurs if the pre_processing_rules are not provided when the mode is not set to "automatic" [1].

To resolve this issue, ensure that the pre_processing_rules are correctly configured in your Notion binding KB setup. You might need to check the configuration settings for the Notion binding KB to ensure that the pre_processing_rules are included and properly defined, similar to how they are set up for non-Notion binding KBs. This typically involves specifying rules like "remove_extra_spaces" and "remove_urls_emails" in the configuration [2].

To continue talking to Dosu, mention @dosu.


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

dosubot[bot] avatar Mar 16 '25 19:03 dosubot[bot]

Same bug. And I cannot find the page to set pre_processing_rule to "automatic", and just "remove_extra_spaces" and "remove_urls_emails". pls help.

lwbiuchsjk avatar Mar 21 '25 01:03 lwbiuchsjk

@dosu I’d like to report that I'm also experiencing this issue.

  • Deployment: Cloud
  • Data source: Notion

Here’s what’s happening:

  1. I connect a KB to Notion and successfully add the first page.
  2. When I try to add a second page from Notion to the same KB, I get the error:Process rule pre_processing_rules is required
  3. However, in the UI, there is no way to configure or see the pre_processing_rules when adding pages from Notion.
    This makes it impossible to fix the issue from the frontend.

File-based KBs work perfectly fine — they allow setting pre-processing rules before uploading.
This behavior seems inconsistent and likely a UI bug specific to Notion-based KBs.

I hope this can be fixed in the upcoming release. Let me know if any more details are needed!

HayatoFujikoshi avatar Apr 07 '25 14:04 HayatoFujikoshi

I encountered the same error in dify 1.1.3 (docker environment). Please help developers.

someonewating avatar Apr 12 '25 14:04 someonewating

The same error persists in version 1.3.1.

Image

spkobayashi avatar May 01 '25 05:05 spkobayashi

i encounter the same problem. i like dify so much, pls email me if the problem has been solved. thanks!!!

Limsym avatar Jun 06 '25 06:06 Limsym

Hello! I'm also facing the same bug, it'd be cool if Dify told us how to solve it.

Emersh0w avatar Jul 01 '25 17:07 Emersh0w