infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
23.93k stars 2.34k forks source link

[Bug]: Error response after move the file to another folder #3247

Open mieco opened 2 weeks ago

mieco commented 2 weeks ago

Is there an existing issue for the same bug?

Branch name

main

Commit ID

latest dev docker image

Other environment information

No response

Actual behavior

can't embedding document after move the file to another folder.

TypeError("The view function for 'document.get' did not return a valid response. The function either returned None or ended without a return statement.")

image

Expected behavior

No response

Steps to reproduce

1. upload the file to the file management
2. link the file to one knowledge base
3. move the file to another folder in file management
4. got error when trying to parse the document

Additional information

No response

yuzhichang commented 5 days ago

I got following error in ragflow_server.log:

2024-11-21 18:45:45,411 ERROR    1782542 total_page_number
Traceback (most recent call last):
  File "/home/zhichyu/github.com/infiniflow/ragflow/deepdoc/parser/pdf_parser.py", line 935, in total_page_number
    pdf = pdfplumber.open(
  File "/home/zhichyu/github.com/infiniflow/ragflow/.venv/lib/python3.10/site-packages/pdfplumber/pdf.py", line 86, in open
    stream = open(path_or_fp, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'SQL+管理命令手册+0.5.0.pdf'
2024-11-21 18:45:45,413 ERROR    1782542 '<' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
  File "/home/zhichyu/github.com/infiniflow/ragflow/api/apps/document_app.py", line 372, in run
    queue_tasks(doc, bucket, name)
  File "/home/zhichyu/github.com/infiniflow/ragflow/api/db/services/task_service.py", line 157, in queue_tasks
    e = min(e - 1, pages)
TypeError: '<' not supported between instances of 'NoneType' and 'int'