From ab850bcedb03423a183d159708ef303b60081189 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Fri, 7 Dec 2018 08:49:50 +0100 Subject: [PATCH] Feat: Change encoding --- pytex/pytex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytex/pytex.py b/pytex/pytex.py index cd11249..89b8ee7 100644 --- a/pytex/pytex.py +++ b/pytex/pytex.py @@ -20,7 +20,7 @@ steam_handler.setFormatter(formatter) # création de l'objet logger qui va nous servir à écrire dans les logs # on met le niveau du logger à DEBUG, comme ça il écrit tout logger = logging.getLogger(__name__) -logger.setLevel(logging.DEBUG) +logger.setLevel(logging.ERROR) logger.addHandler(steam_handler) @@ -105,7 +105,7 @@ def pdflatex(latex_file, output_dir=""): latex_error_logger = filter_errors(generic_sink(logger.error)) for line in compilation.stdout: - latex_error_logger.send(line.decode("utf-8").rstrip('\r\n')) + latex_error_logger.send(line.decode("latin-1").rstrip('\r\n')) logger.debug(f"{latex_file.name} has been compiled in {output_dir}") pwd.cd()