You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
➜ Desktop python3 samples.py
Traceback (most recent call last):
File "samples.py", line 212, in <module>
with pdfplumber.open(file_name, password="") as pdf:
File "/home/johnny/.local/lib/python3.8/site-packages/pdfplumber/pdf.py", line 55, in open
inst = cls(fp, **kwargs)
File "/home/johnny/.local/lib/python3.8/site-packages/pdfplumber/pdf.py", line 32, in __init__
self.doc = PDFDocument(PDFParser(stream), password=password)
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 575, in __init__
self._initialize_password(password)
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 599, in _initialize_password
handler = factory(docid, param, password)
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 300, in __init__
self.init()
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 307, in init
self.init_key()
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 320, in init_key
self.key = self.authenticate(self.password)
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 368, in authenticate
key = self.authenticate_user_password(password)
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 374, in authenticate_user_password
key = self.compute_encryption_key(password)
File "/home/johnny/.local/lib/python3.8/site-packages/pdfminer/pdfdocument.py", line 351, in compute_encryption_key
password = (password + self.PASSWORD_PADDING)[:32] # 1
TypeError: can only concatenate str (not "bytes") to str
pdfplumber default passwd ispassword='', use password=''.encode() to skip this error or pdfminer.pdfdocument.PDFEncryptionError.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
pdfplumber
default passwd ispassword=''
, usepassword=''.encode()
to skip this error orpdfminer.pdfdocument.PDFEncryptionError
.The text was updated successfully, but these errors were encountered: