From 2a37562791dbb4715db0a6b291e49dfa7afcb85c Mon Sep 17 00:00:00 2001 From: Idriss Sbaaoui <112825897+6ba3i@users.noreply.github.com> Date: Tue, 28 Apr 2026 14:21:30 +0800 Subject: [PATCH] Fix manual naive parser position extraction fallback (#14420) ### What problem does this PR solve? This PR fixes a regression where Manual pipeline + Naive (Plain Text) PDF parsing crashed with `AttributeError: 'PlainParser' object has no attribute 'extract_positions'` in `rag/app/manual.py`. fixes #14411 ### Type of change: - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/app/manual.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]