From 94e27a1f7bd35f67f950012befa3b7c13a9de07c Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Tue, 2 Mar 2021 18:33:00 -0500 Subject: [PATCH] No need to decode --- utils/story_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/story_functions.py b/utils/story_functions.py index 1e92fa89e..370a7f2b4 100644 --- a/utils/story_functions.py +++ b/utils/story_functions.py @@ -277,7 +277,7 @@ def truncate_chars(value, max_length): return value.decode('utf-8', 'ignore') truncd_val = value[:max_length] - if value[max_length].decode() != " ": + if value[max_length] != b" ": rightmost_space = truncd_val.rfind(b" ") if rightmost_space != -1: truncd_val = truncd_val[:rightmost_space]