diff --git a/camelot/utils.py b/camelot/utils.py index 1f54485..442c807 100644 --- a/camelot/utils.py +++ b/camelot/utils.py @@ -14,7 +14,7 @@ from pdfminer.pdfparser import PDFParser from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfpage import PDFPage -from pdfminer.pdfpage import PDFTextExtractionNotAllowed +from pdfminer.pdfpage import PDFTextExtractionNotAllowedError from pdfminer.pdfinterp import PDFResourceManager from pdfminer.pdfinterp import PDFPageInterpreter from pdfminer.converter import PDFPageAggregator @@ -780,7 +780,7 @@ def get_page_layout( parser = PDFParser(f) document = PDFDocument(parser) if not document.is_extractable: - raise PDFTextExtractionNotAllowed + raise PDFTextExtractionNotAllowedError(f"Text extraction is not allowed: {filename}") laparams = LAParams( char_margin=char_margin, line_margin=line_margin, diff --git a/requirements.txt b/requirements.txt index 6db324b..887a89b 100755 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ numpy>=1.13.3 opencv-python>=3.4.2.17 openpyxl>=2.5.8 pandas>=0.23.4 -pdfminer.six>=20170720 +pdfminer.six>=20200720 PyPDF2>=1.26.0 Sphinx>=1.7.9 diff --git a/setup.py b/setup.py index 9b1a322..1f8ab73 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ 'numpy>=1.13.3', 'openpyxl>=2.5.8', 'pandas>=0.23.4', - 'pdfminer.six>=20170720', + 'pdfminer.six>=20200720', 'PyPDF2>=1.26.0' ]