Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: Manual/Naive outline tuple unpack crash (#14518)

Idriss Sbaaoui907587243578
diff --git a/rag/app/manual.py b/rag/app/manual.py
index b9afdbf725..b3f5f2edc1 100644
--- a/rag/app/manual.py
+++ b/rag/app/manual.py
@@ -270,7 +270,7 @@ def chunk(filename, binary=None, from_page=0, to_page=MAXIMUM_PAGE_NUMBER, lang=
if res and pdf_parser and getattr(pdf_parser, "outlines", None):
res[0]["__outline__"] = [
{"title": title, "depth": depth}
- for title, depth in pdf_parser.outlines
+ for title, depth, *_ in pdf_parser.outlines
]
return res
diff --git a/rag/app/naive.py b/rag/app/naive.py
index 513f503b65..90d1b42858 100644
--- a/rag/app/naive.py
+++ b/rag/app/naive.py
@@ -1133,7 +1133,7 @@ def chunk(filename, binary=None, from_page=0, to_page=MAXIMUM_PAGE_NUMBER, lang=
if res and pdf_parser and getattr(pdf_parser, "outlines", None):
res[0]["__outline__"] = [
{"title": title, "depth": depth}
- for title, depth in pdf_parser.outlines
+ for title, depth, *_ in pdf_parser.outlines
]
return res