From 10b516b1b82479d6547c25edca36ad3629bbcd2c Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 21 Mar 2019 00:48:22 +0100 Subject: Lazy fix, string encoding is likely still an issue. --- jh-discord.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jh-discord.py b/jh-discord.py index 4d27b5a..543269b 100644 --- a/jh-discord.py +++ b/jh-discord.py @@ -64,7 +64,7 @@ def get_jh_reply (): if ((jh_reply == b"!P \n") or (jh_reply == b"!N \n")): is_done = True else: - jh_reply = jh_reply.decode("UTF-8") + jh_reply = jh_reply.decode("UTF-8", "ignore") if (jh_reply.startswith("!GR ")): result = jh_reply[4:] @@ -97,7 +97,7 @@ async def on_message(message): has_lock = False try: - msg = bytes(message.clean_content.replace('\n', ' '), "utf8", 'strict') + msg = bytes(message.clean_content.replace('\n', ' '), "utf8", 'ignore') server_mutex.acquire() has_lock = True -- cgit v1.2.3-70-g09d2