We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am porting my script from python27 to python33. When I run the code pdf = PdfFileReader(open('xxxx.pdf', 'rb')), the error message appears:
pdf = PdfFileReader(open('xxxx.pdf', 'rb'))
Traceback (most recent call last): File ..., in <module>raw_content = pdf.getPage(0).extractText() File "C:\Python33\lib\site-packages\PyPDF2\pdf.py", line 1718, in extract Textcontent = ContentStream(content, self.pdf) File "C:\Python33\lib\site-packages\PyPDF2\pdf.py", line 1797, in __init__data += s.getObject().getData() TypeError: Can't convert 'bytes' object to str implicitly
On the other hand, I cannot open the file with
pdf = PdfFileReader(open('xxxx.pdf', 'r'))
otherwise, it comes the following messages:
io.UnsupportedOperation: can't do nonzero end-relative seeks
What's going wrong?
The text was updated successfully, but these errors were encountered:
I am having the same problem :( Have you found any solution?
Sorry, something went wrong.
Same problem :(
According to docs you can't seek the end of a file without the beginning for python 3.2+. I am having the same issue.
same problem
No branches or pull requests
I am porting my script from python27 to python33.
When I run the code
pdf = PdfFileReader(open('xxxx.pdf', 'rb'))
, the error message appears:On the other hand, I cannot open the file with
otherwise, it comes the following messages:
What's going wrong?
The text was updated successfully, but these errors were encountered: