I'm following the book 'Automate the boring stuff' and on chapter 15 I ran into a problem. It should be a very simple program to unlock a decrypted file using a password but it just won't work for me. I've looked up solutions to this problem. The solutions where to use the open function with 'rb' I did that but still get the same error. All help is appreciated!
import PyPDF2
pdfReader = PyPDF2.PdfFileReader(open('C:\\Path\\to\\the\\file\\encrypted.pdf'),'rb')
pdfReader.decrypt('rosebud')
Error:
io.UnsupportedOperation: can't do nonzero end-relative seeks