Skip to content

Commit

Permalink
MAINT: Add diagnostic output to exception in read_from_stream
Browse files Browse the repository at this point in the history
Co-authored-by: speedplane <mes65@cornell.edu>
  • Loading branch information
MartinThoma and speedplane committed Jul 24, 2022
1 parent c529884 commit 32cab9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PyPDF2/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def read_unsized_from_steam(stream: StreamType, pdf: Any) -> bytes: # PdfReader
stream.seek(pos, 0)
raise PdfReadError(
"Unable to find 'endstream' marker after stream at byte "
f"{hex_str(stream.tell())}."
f"{hex_str(stream.tell())} (nd='{ndstream!r}', end='{end!r}')."
)
else:
stream.seek(pos, 0)
Expand Down

0 comments on commit 32cab9c

Please sign in to comment.