--> -->
DeprecationError |
Python 3.12.8: C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe Sat Jan 18 10:58:13 2025 |
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
C:\apache24\htdocs\cgi-bin\stamp\msapp\bcntstamp.py in <module> |
81 agentnum = tdict['cntagtnum']
|
82 mktemplate(agentnum,tdict)
|
=> 83 watermark(input_pdf = 'c:/Apache24/htdocs/brochures/ms/cnt.pdf',
|
=> 84 output_pdf = 'c:/Apache24/htdocs/wwwbin/output.pdf',
|
=> 85 watermark_pdf = 'template.pdf')
|
watermark = <function watermark>, input_pdf undefined, output_pdf undefined, watermark_pdf undefined |
C:\apache24\htdocs\cgi-bin\stamp\msapp\bcntstamp.py in watermark(input_pdf='c:/Apache24/htdocs/brochures/ms/cnt.pdf', output_pdf='c:/Apache24/htdocs/wwwbin/output.pdf', watermark_pdf='template.pdf') |
53 def watermark(input_pdf,output_pdf,watermark_pdf):
|
54 watermark = PdfReader(watermark_pdf)
|
=> 55 watermark_page = watermark.getPage(0)
|
56
|
57 pdf = PdfReader(input_pdf)
|
watermark_page undefined, watermark = <PyPDF2._reader.PdfReader object>, watermark.getPage = <bound method PdfReader.getPage of <PyPDF2._reader.PdfReader object>> |
C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\_utils.py in deprecation_with_replacement(old_name='reader.getPage(pageNumber)', new_name='reader.pages[page_number]', removed_in='3.0.0') |
367 Raise an exception that a feature was already removed, but has a replacement.
|
368 """
|
=> 369 deprecation(DEPR_MSG_HAPPENED.format(old_name, removed_in, new_name))
|
370
|
371
|
global deprecation = <function deprecation>, global DEPR_MSG_HAPPENED = '{} is deprecated and was removed in PyPDF2 {}. Use {} instead.', DEPR_MSG_HAPPENED.format = <built-in method format of str object>, old_name = 'reader.getPage(pageNumber)', removed_in = '3.0.0', new_name = 'reader.pages[page_number]' |
DeprecationError: reader.getPage(pageNumber) is deprecated and was removed in PyPDF2 3.0.0. Use reader.pages[page_number] instead.
add_note =
<built-in method add_note of DeprecationError object>
args =
('reader.getPage(pageNumber) is deprecated and was...DF2 3.0.0. Use reader.pages[page_number] instead.',)
with_traceback =
<built-in method with_traceback of DeprecationError object>