ฉันกำลังพยายามเปิด pdf (ชื่อ kalimera.pdf) โดยใช้ PdfFileReader จากโมดูล pyPdf โดยใช้ชุดคำสั่งต่อไปนี้
from pyPdf import PdfFileReader, PdfFileWriter
document = PdfFileReader(open('kalimera.pdf', 'rb'))
ฉันได้รับข้อผิดพลาดต่อไปนี้:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pyPdf/pdf.py", line 374, in __init__
self.read(stream)
File "/Library/Python/2.7/site-packages/pyPdf/pdf.py", line 702, in read
stream.seek(-1, 2)
IOError: [Errno 22] Invalid argument
แพลตฟอร์มนี้คือ OSX 10.11.3 และเวอร์ชัน python คือ 2.7.10 (แม้ว่าจะทำซ้ำใน python3.5 เช่นกัน)
IOError
... - person summea   schedule 09.02.2016