From 9786aab050f413dcf6b79615ec3f41b6e1ea280a Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 15 May 2016 16:33:53 +0200 Subject: [PATCH] Fix UnicodeEncodeError for file paths - Fixes #35 --- resources/lib/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 157064f1..2e85228e 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -954,4 +954,7 @@ def tryDecode(string, encoding='utf-8'): string = string.decode(encoding, "ignore") except TypeError: string = string.decode() + except UnicodeEncodeError: + # Already in unicode - e.g. sometimes file paths + pass return string