0
了pyPDF2 LIB跑這裏例如: https://github.com/mstamy2/PyPDF2/tree/Python3-3pyPDF2類型錯誤時,從LIB從
當試圖運行腳本「示例1:」從那裏看到:
PyPDF2 python versions (2.5 - 3.3) compatibility branch
Traceback (most recent call last):
File "1.py", line 6, in <module>
input1 = PdfFileReader(open("document1.pdf", "rb"))
File "C:\Python33\lib\site-packages\PyPDF2\pdf.py", line 595, in __init__
self.read(stream)
File "C:\Python33\lib\site-packages\PyPDF2\pdf.py", line 1097, in read
streamData = StringIO(xrefstream.getData())
TypeError: initial_value must be str or None, not bytes
什麼是錯的?
你終於找到解決這個錯誤的辦法了嗎? – juankysmith
不,我找不到解決方案( – Dmitry
嘗試提取文本時可能出現[pyPDF2 TypeError]重複(http://stackoverflow.com/questions/17270387/pypdf2-typeerror-when-trying-to-extract-text ) – juankysmith