Skip to content

Commit

Permalink
Merge pull request atlanhq#171 from camelot-dev/fix-169
Browse files Browse the repository at this point in the history
Change error name and update pdfminer.six version
  • Loading branch information
vinayak-mehta authored Jul 21, 2020
2 parents 4b08165 + a13e2f6 commit be25e6d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions camelot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]

Expand Down

0 comments on commit be25e6d

Please sign in to comment.