diff --git a/textract/parsers/pdf_parser.py b/textract/parsers/pdf_parser.py index 9fe74e13..7e5f7018 100644 --- a/textract/parsers/pdf_parser.py +++ b/textract/parsers/pdf_parser.py @@ -52,7 +52,7 @@ def extract_pdfminer(self, filename, **kwargs): pdf2txt_path = find_executable('pdf2txt.py') try: stdout, _ = self.run(['pdf2txt.py', filename]) - except OSError: + except (OSError, ShellError): try: stdout, _ = self.run(['python3',pdf2txt_path, filename]) except ShellError: