IndexError |
Python 3.12.8: C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe Sat Jan 18 11:10:26 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\buhcstamp.py in <module> |
79 agentnum = tdict['uhcagtnum'] |
80 mktemplate(agentnum,tdict) |
=> 81 watermark(input_pdf = 'c:/Apache24/htdocs/brochures/ms/uhc.pdf', |
=> 82 output_pdf = 'c:/Apache24/htdocs/wwwbin/output.pdf', |
=> 83 watermark_pdf = 'template.pdf') |
watermark = <function watermark>, input_pdf undefined, output_pdf undefined, watermark_pdf undefined |
C:\apache24\htdocs\cgi-bin\stamp\msapp\buhcstamp.py in watermark(input_pdf='c:/Apache24/htdocs/brochures/ms/uhc.pdf', output_pdf='c:/Apache24/htdocs/wwwbin/output.pdf', watermark_pdf='template.pdf') |
51 watermark = PdfReader(watermark_pdf) |
52 #watermark_page = watermark.getPage(0) --------------------- |
=> 53 watermark_page = watermark.pages[0] |
54 pdf = PdfReader(input_pdf) |
55 pdf_writer = PdfWriter() |
watermark_page undefined, watermark = <PyPDF2._reader.PdfReader object>, watermark.pages = <PyPDF2._page._VirtualList object> |
C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyPDF2\_page.py in __getitem__(self=<PyPDF2._page._VirtualList object>, index=0) |
2075 index = len_self + index |
2076 if index < 0 or index >= len_self: |
=> 2077 raise IndexError("sequence index out of range") |
2078 return self.get_function(index) |
2079 |
builtin IndexError = <class 'IndexError'> |
IndexError: sequence index out of range
add_note =
<built-in method add_note of IndexError object>
args =
('sequence index out of range',)
with_traceback =
<built-in method with_traceback of IndexError object>