From 7e80a3a974392acce0489505eabaa0e48f0ca708 Mon Sep 17 00:00:00 2001 From: Harly Hallikas <30772586+harlyh@users.noreply.github.com> Date: Mon, 17 Jul 2023 15:38:28 +0100 Subject: [PATCH] Additional Unicode logging fix for ooba_client.py --- src/oobabot/ooba_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oobabot/ooba_client.py b/src/oobabot/ooba_client.py index 0c9fe5e4..876c749c 100644 --- a/src/oobabot/ooba_client.py +++ b/src/oobabot/ooba_client.py @@ -262,7 +262,7 @@ async def request_by_token(self, prompt: str) -> typing.AsyncIterator[str]: text = incoming_data["text"] if text != SentenceSplitter.END_OF_INPUT: if self.log_all_the_things: - print(text, end="", flush=True) + print(text.encode('utf-8'), end="", flush=True) yield text