PyPDF2 throws TypeError - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PyPDF2 throws TypeError

SreenathSreenath IndiaPosts: 0Member

I am trying to create watermark on a pdf file. Am using py3.4 and PyPDF2. while executing the merge statement i am getting error as shown below. Any help would be greatly appreciated.

Traceback (most recent call last):
File "C:\Documents and Settings\Administrator.COMPUTER-D2BC9B\Desktop\", line 49, in
File "c:\python34\lib\site-packages\PyPDF2\", line 1803, in mergePage
File "c:\python34\lib\site-packages\PyPDF2\", line 1853, in _mergePage
originalContent, self.pdf))
File "c:\python34\lib\site-packages\PyPDF2\", line 1766, in _pushPopGS
stream = ContentStream(contents, pdf)
File "c:\python34\lib\site-packages\PyPDF2\", line 2210, in init
stream = BytesIO(b
File "c:\python34\lib\site-packages\PyPDF2\", line 829, in getData
decoded._data = filters.decodeStreamData(self)
File "c:\python34\lib\site-packages\PyPDF2\", line 316, in decodeStreamData
data = ASCII85Decode.decode(data)
File "c:\python34\lib\site-packages\PyPDF2\", line 256, in decode
data = [y for y in data if not (y in ' \n\r\t')]
File "c:\python34\lib\site-packages\PyPDF2\", line 256, in
data = [y for y in data if not (y in ' \n\r\t')]
TypeError: 'in ' requires string as left operand, not int

Sign In or Register to comment.