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
When attempting to crop a PDF with krop, it crashes with the message: PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.
Steps To Reproduce
krop --grid=2x1 --go -o output.pdf input.pdf
Screenshots
If applicable, add screenshots to help explain your problem.
WARNING: Something got in our way
The following unexpected error has occured:
PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.
Traceback (most recent call last):
File "/nix/store/v2m75p3qaj3lq00chsicqxb8bf88kfn9-krop-0.6.0/lib/python3.10/site-packages/krop/mainwindow.py", line 450, in slotKrop
raise err
File "/nix/store/v2m75p3qaj3lq00chsicqxb8bf88kfn9-krop-0.6.0/lib/python3.10/site-packages/krop/mainwindow.py", line 414, in slotKrop
pdf.loadFromFile(inputFileName)
File "/nix/store/v2m75p3qaj3lq00chsicqxb8bf88kfn9-krop-0.6.0/lib/python3.10/site-packages/krop/pdfcropper.py", line 45, in loadFromFile
self.loadFromStream(open(filename, "rb"))
File "/nix/store/v2m75p3qaj3lq00chsicqxb8bf88kfn9-krop-0.6.0/lib/python3.10/site-packages/krop/pdfcropper.py", line 66, in loadFromStream
self.reader = PdfFileReader(stream, strict=False)
File "/nix/store/kz3rjc7dqhj0z2hmap2rx2fdqs5ki8x5-python3.10-PyPDF2-3.0.1/lib/python3.10/site-packages/PyPDF2/_reader.py", line 1974, in __init__
deprecation_with_replacement("PdfFileReader", "PdfReader", "3.0.0")
File "/nix/store/kz3rjc7dqhj0z2hmap2rx2fdqs5ki8x5-python3.10-PyPDF2-3.0.1/lib/python3.10/site-packages/PyPDF2/_utils.py", line 369, in deprecation_with_replacement
deprecation(DEPR_MSG_HAPPENED.format(old_name, removed_in, new_name))
File "/nix/store/kz3rjc7dqhj0z2hmap2rx2fdqs5ki8x5-python3.10-PyPDF2-3.0.1/lib/python3.10/site-packages/PyPDF2/_utils.py", line 351, in deprecation
raise DeprecationError(msg)
PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.
Aborted (core dumped)
@leenaars, since upstream hasn't released an update with the commit which fixes this issue, would you consider updating the Nix package to use a commit as the version, rather than using the "0.6.0" tag?
You can probably use the current master as the commit.
Describe the bug
When attempting to crop a PDF with krop, it crashes with the message: PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.
Steps To Reproduce
krop --grid=2x1 --go -o output.pdf input.pdf
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
I expected the input PDF to be cropped.
Notify maintainers
@leenaars
Metadata
The text was updated successfully, but these errors were encountered: