diff --git a/textract/parsers/pdf_parser.py b/textract/parsers/pdf_parser.py index 10d488af..368f352c 100644 --- a/textract/parsers/pdf_parser.py +++ b/textract/parsers/pdf_parser.py @@ -55,7 +55,7 @@ def extract_pdfminer(self, filename, **kwargs): pdf2txt_path = which("pdf2txt.py") try: stdout, _ = self.run(['pdf2txt.py', filename]) - except OSError: + except (OSError, ShellError): try: stdout, _ = self.run(['python3',pdf2txt_path, filename]) except ShellError: