From 3855bb16ed9bf47853368c14f7b8fe5f69516997 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Tue, 26 Apr 2016 19:19:52 +0200 Subject: [PATCH] Fix UnicodeEncodeError, fixes #8 --- resources/lib/PlexAPI.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 20845c81..c306f7f4 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1237,7 +1237,11 @@ class API(): except: res = None if res is not None: - res = unquote(res).decode('utf-8') + try: + res = unquote(res).decode('utf-8') + except UnicodeEncodeError: + # Sometimes, unquote seems to return unicode, not string + res = unquote(res) return res def getTVShowPath(self):