PyPDF's PdfFileReader() having problems reading file, file not callable
问题 So here is my import: from pyPdf import PdfFileWriter, PdfFileReader Here is were I write my pdf: filenamer = filename + '.pdf' pdf = PdfPages(filenamer) (great naming convention, I know!) I write some things to it. I close it here: pdf.close() Here is where I try and read it: input1 = PdfFileReader(file(filenamer, "rb")) And here is the error: Traceback (most recent call last): File "./datamine.py", line 405, in <module> input1 = PdfFileReader(file(filenamer, "rb")) TypeError: 'file' object