Missing root object raising: 'NoneType' object has no attribute 'get_object' (different from #1295 & #1689) #2806
Labels
is-uncaught-exception
Use this label only for issues caused by broken PDF documents that cannot be recovered.
PdfReader
The PdfReader component is affected
As I was processing client PDFs with pypdf, one of them triggered a cryptic error (traceback below).
Ideally, pypdf should raise a
PdfReadError
(or another subclass ofPyPdfError
) if that file is really impossible to parse.Environment
Code
This is a minimal code example that shows the issue:
I cannot share the PDF as it might contain sensitive client data.
Two messages/warnings are displayed before the traceback, though:
Traceback
This is the complete traceback I see:
Additional info
The PDF might be corrupted, as I am unable to open it with Evince, which shows this error:
Failed to read the document catalog
.xpdf is also showing various errors when reading the file:
The text was updated successfully, but these errors were encountered: