From b7927a0df1f6fc96d753bb36c9834f85ed7bf908 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 18 Dec 2021 18:38:17 +0100 Subject: [PATCH] Bugfix handling of stacktrace from calibre --- cps/tasks/convert.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/tasks/convert.py b/cps/tasks/convert.py index 004faec8..59ad6909 100644 --- a/cps/tasks/convert.py +++ b/cps/tasks/convert.py @@ -239,9 +239,10 @@ class TaskConvert(CalibreTask): calibre_traceback = p.stderr.readlines() error_message = "" for ele in calibre_traceback: - log.debug(ele.strip('\n')) + ele = ele.decode('utf-8', errors="ignore").strip('\n') + log.debug(ele) if not ele.startswith('Traceback') and not ele.startswith(' File'): - error_message = _("Calibre failed with error: %(error)s", error=ele.strip('\n')) + error_message = _("Calibre failed with error: %(error)s", error=ele) return check, error_message @property