You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
extract_pdf_text returns "" silently on extraction failure (indistinguishable from an empty PDF) #4527
extract_pdf_text wraps its entire PdfReader loop in except Exception: return "", so a malformed, encrypted, or otherwise unreadable PDF is indistinguishable from a PDF with no text. Downstream consumers (knowledge-graph builders, RAG indexers) count the document as "empty" rather than "failed" — in our pipeline this was a coverage-audit blind spot: files producing zero nodes with no trace anywhere, undetectable without re-running extraction manually.
Suggested shape: a warning to stderr naming the file and the exception class before returning (or a distinct sentinel), and a separate warning when the result is near-empty (so scanned/image-only PDFs are visible in logs rather than silently skipped — related: the OCR gap in #181).
We implemented both locally (a warning on failure; a near-empty-result warning; an optional OCR fallback for the latter case) and they turned silent data loss into visible, countable events. Small patch, happy to PR.
Activity
github-actions commentedon Oct 17, 2026
Thanks for opening this issue, @grazenN. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.