Private GIT

Skip to content
Snippets Groups Projects
Commit b121a2e8 authored by Ruud's avatar Ruud
Browse files

Add traceback to unicode encoding

parent 7f52d8e4
No related branches found
Tags
No related merge requests found
......@@ -2,6 +2,7 @@ from couchpotato.core.logger import CPLog
from string import ascii_letters, digits
from urllib import quote_plus
import re
import traceback
import unicodedata
log = CPLog(__name__)
......@@ -30,8 +31,8 @@ def toUnicode(original, *args):
return ek(original, *args)
except:
raise
except UnicodeDecodeError:
log.error('Unable to decode value: %s... ', repr(original)[:20])
except:
log.error('Unable to decode value "%s..." : %s ', (repr(original)[:20], traceback.format_exc()))
ascii_text = str(original).encode('string_escape')
return toUnicode(ascii_text)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment