Skip to content

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

Fix manual naive parser position extraction fallback (#14420)

Idriss Sbaaoui2a37562791db
diff --git a/rag/app/manual.py b/rag/app/manual.py
index 576d06fafb..b9afdbf725 100644
--- a/rag/app/manual.py
+++ b/rag/app/manual.py
@@ -183,7 +183,7 @@ def chunk(filename, binary=None, from_page=0, to_page=MAXIMUM_PAGE_NUMBER, lang=
txt, layoutno, poss = section
if isinstance(poss, str):
- poss = pdf_parser.extract_positions(poss)
+ poss = (getattr(pdf_parser, "extract_positions", lambda _: [])(poss) or [[0, 0, 0, 0, 0]])
if poss:
first = poss[0] # tuple: ([pn], x1, x2, y1, y2)
pn = first[0]