Closed caver456 closed 1 year ago
Note - this wasn't showing up during development, because I had PyPDF 2.something.something on the development machine, but the build was using PyPDF 3.something.something. Upgraded on the development machine, and can now see the error.
Looks like this is a pitfall of a bit of a sloppy development process. Grownups should make sure they are developing with the same versions of all packages that build uses. What's the best and lowest-impact way to accomplish this - other than doing the tests on the build result as well?
Next error, after changing to PdfReader:
Traceback (most recent call last):
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 6784, in keyPressEvent
self.accept()
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 6835, in accept
self.parent.parent.printClueReport(clueData)
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 3194, in printClueReport
templatePage=templatePDF.getPage(0)
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_reader.py", line 476, in getPage
deprecation_with_replacement(
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_utils.py", line 369, in deprecation_with_replacement
deprecation(DEPR_MSG_HAPPENED.format(old_name, removed_in, new_name))
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_utils.py", line 351, in deprecation
raise DeprecationError(msg)
PyPDF2.errors.DeprecationError: reader.getPage(pageNumber) is deprecated and was removed in PyPDF2 3.0.0. Use reader.pages[page_number] instead.
next:
080518:generating clue report pdf: C:\Users\caver\RadioLog\New_Incident_2023_03_09_080505\New_Incident_2023_03_09_080505_clue01.pdf
080518:parsed instructions:['asdf']
Traceback (most recent call last):
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 6835, in accept
self.parent.parent.printClueReport(clueData)
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 3196, in printClueReport
templatePage.mergePage(overlayPDF.pages[0])
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_page.py", line 693, in mergePage
deprecation_with_replacement("mergePage", "merge_page", "3.0.0")
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_utils.py", line 369, in deprecation_with_replacement
deprecation(DEPR_MSG_HAPPENED.format(old_name, removed_in, new_name))
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_utils.py", line 351, in deprecation
raise DeprecationError(msg)
PyPDF2.errors.DeprecationError: mergePage is deprecated and was removed in PyPDF2 3.0.0. Use merge_page instead.
next:
080658:generating clue report pdf: C:\Users\caver\RadioLog\New_Incident_2023_03_09_080644\New_Incident_2023_03_09_080644_clue01.pdf
080658:parsed instructions:['sadf']
Traceback (most recent call last):
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 6784, in keyPressEvent
self.accept()
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 6835, in accept
self.parent.parent.printClueReport(clueData)
File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 3197, in printClueReport
outputPDF=PdfFileWriter()
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_writer.py", line 2821, in __init__
deprecation_with_replacement("PdfFileWriter", "PdfWriter", "3.0.0")
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_utils.py", line 369, in deprecation_with_replacement
deprecation(DEPR_MSG_HAPPENED.format(old_name, removed_in, new_name))
File "C:\Users\caver\AppData\Roaming\Python\Python310-32\site-packages\PyPDF2\_utils.py", line 351, in deprecation
raise DeprecationError(msg)
PyPDF2.errors.DeprecationError: PdfFileWriter is deprecated and was removed in PyPDF2 3.0.0. Use PdfWriter instead.
next:
PyPDF2.errors.DeprecationError: addPage is deprecated and was removed in PyPDF2 3.0.0. Use add_page instead.
Ok now it seems to be good. This is definitely worth a hotfix. Will think about whether it should be 3.5.1 or 3.6.0, based on other fixes that have happened on master since 3.5.0, and will install at 91 tonight.
Clue dialog stays open; this prevents print and prevents accept of the clue dialog: