From 82f6cad5f7f3d2cda61fc307d9b1b852e80ce917 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 2 May 2022 11:29:24 -0400 Subject: [PATCH] [56] #834 Fix latin encoding error --- VERSION | 2 +- modules/logs.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 0e112759..5d46a82c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.5-develop55 +1.16.5-develop56 diff --git a/modules/logs.py b/modules/logs.py index 80232e39..58bbf462 100644 --- a/modules/logs.py +++ b/modules/logs.py @@ -198,7 +198,12 @@ class MyLogger: def ghost(self, text): if not self.ignore_ghost: - print(self._space(f"| {text}"), end="\r") + try: + final_text = f"| {text}" + except UnicodeEncodeError: + text = text.encode("utf-8") + final_text = f"| {text}" + print(self._space(final_text), end="\r") self.spacing = len(text) + 2 def exorcise(self):