From 24a6bb7c03fc65a7588e74782c741e0f484cd368 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 6 Dec 2019 13:07:53 +0000 Subject: [PATCH] ignore non utf-8 output --- pandora/document/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/document/utils.py b/pandora/document/utils.py index c579f0dc..233276b5 100644 --- a/pandora/document/utils.py +++ b/pandora/document/utils.py @@ -15,7 +15,7 @@ def pdfinfo(pdf): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) stdout, stderr = p.communicate() data = {} - for line in stdout.decode('utf-8').strip().split('\n'): + for line in stdout.decode('utf-8', 'replace').strip().split('\n'): parts = line.split(':') key = parts[0].lower().strip() if key: