Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Getting deprecation warning with PyPDF2 #2

Open
suspiciousRaccoon opened this issue May 6, 2024 · 0 comments
Open

Getting deprecation warning with PyPDF2 #2

suspiciousRaccoon opened this issue May 6, 2024 · 0 comments

Comments

@suspiciousRaccoon
Copy link

Getting this error with main, Altough I got it working with commit 423abf0ab2c5a4f03b70687329f4b4e1df211011

This is unrelated to the problem, but I'd recommend using a .gitignore template as well.

(venv) C:\PDFtools>python subset.py
Enter the name of the pdf : input
Enter the slicing : 28-38
Traceback (most recent call last):
  File "C:\PDFtools\subset.py", line 68, in <module>
    main()
  File "C:\PDFtools\subset.py", line 64, in main
    pdf_name, pdfFileObj, pages, pdfReader, num_of_pages, output = gather_info()
                                                                   ^^^^^^^^^^^^^
  File "C:\PDFtools\subset.py", line 55, in gather_info
    pdfReader = PdfFileReader(pdfFileObj)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PDFtools\venv\Lib\site-packages\PyPDF2\_reader.py", line 1974, in __init__
    deprecation_with_replacement("PdfFileReader", "PdfReader", "3.0.0")
  File "C:\PDFtools\venv\Lib\site-packages\PyPDF2\_utils.py", line 369, in deprecation_with_replacement
    deprecation(DEPR_MSG_HAPPENED.format(old_name, removed_in, new_name))
  File "C:\PDFtools\venv\Lib\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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant