Dont run time import upload file knowledge #5088

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

Originally created by @hebum on GitHub (Aug 16, 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.6.16

Cloud or Self Hosted

Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

image

✔️ Expected Behavior

Please fix bug code on dify local => dont run knowledge upload file ? Help me. Tks u
image

Actual Behavior

image
Originally created by @hebum on GitHub (Aug 16, 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.6.16 ### Cloud or Self Hosted Self Hosted (Docker), Self Hosted (Source) ### Steps to reproduce <img width="959" alt="image" src="https://github.com/user-attachments/assets/0c8182e0-1daa-4fee-9b28-cda4cc8242e2"> ### ✔️ Expected Behavior Please fix bug code on dify local => dont run knowledge upload file ? Help me. Tks u <img width="959" alt="image" src="https://github.com/user-attachments/assets/467ca542-868d-498c-9c68-8068dba703ce"> ### ❌ Actual Behavior <img width="959" alt="image" src="https://github.com/user-attachments/assets/de2c5c1e-f4c1-45e0-a216-cc3603b8112b">
yindo added the 🐞 bug label 2026-02-21 18:09:19 -05:00
yindo closed this issue 2026-02-21 18:09:19 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 16, 2024):

There is a known issue in Dify version 0.6.16 related to document processing and queuing. Specifically, the duplicate_document_indexing_task function does not handle exceptions properly during the document processing phase. If an exception occurs, it only logs the exception and does not update the document's status to 'error' or provide any error details, which can lead to documents being stuck in an incomplete state without clear error information.

Here is the relevant code snippet showing the issue:

try:
    indexing_runner = IndexingRunner()
    indexing_runner.run(documents)
    end_at = time.perf_counter()
    logging.info(click.style('Processed dataset: {} latency: {}'.format(dataset_id, end_at - start_at), fg='green'))
except DocumentIsPausedException as ex:
    logging.info(click.style(str(ex), fg='yellow'))
except Exception:
    pass  # This is where the issue lies; exceptions are not properly handled.

To fix this, you should handle the general exception case by updating the document's status to 'error' and logging the error details [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 16, 2024): <!-- Answer --> There is a known issue in Dify version 0.6.16 related to document processing and queuing. Specifically, the `duplicate_document_indexing_task` function does not handle exceptions properly during the document processing phase. If an exception occurs, it only logs the exception and does not update the document's status to 'error' or provide any error details, which can lead to documents being stuck in an incomplete state without clear error information. Here is the relevant code snippet showing the issue: ```python try: indexing_runner = IndexingRunner() indexing_runner.run(documents) end_at = time.perf_counter() logging.info(click.style('Processed dataset: {} latency: {}'.format(dataset_id, end_at - start_at), fg='green')) except DocumentIsPausedException as ex: logging.info(click.style(str(ex), fg='yellow')) except Exception: pass # This is where the issue lies; exceptions are not properly handled. ``` To fix this, you should handle the general exception case by updating the document's status to 'error' and logging the error details <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/tasks/duplicate_document_indexing_task.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Aug 17, 2024):

Duplicated, see https://github.com/langgenius/dify/issues/7368

@crazywoola commented on GitHub (Aug 17, 2024): Duplicated, see https://github.com/langgenius/dify/issues/7368
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5088