Using from PyPDF2.pdf import PdfFileReader
My temp = open('HW8.pdf', 'rb')
returns an error when run, saying HW8.pdf could not be found even though it's in the same folder as my python code.
Not sure how to go from here.
Make sure you are in the correct directory; I tried your snippet, and realized that I wasn't in the correct directory. The 'test.pdf' file was on my desktop, and this didn't throw any errors:
import os
from PyPDF2 import PdfFileReader
os.chdir('/home/asylumax/Desktop')
temp = open('test.pdf', 'rb')