Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CouchPotatoServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
CouchPotatoServer
Commits
b121a2e8
Commit
b121a2e8
authored
Sep 2, 2012
by
Ruud
Browse files
Options
Downloads
Patches
Plain Diff
Add traceback to unicode encoding
parent
7f52d8e4
No related branches found
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
couchpotato/core/helpers/encoding.py
+3
-2
3 additions, 2 deletions
couchpotato/core/helpers/encoding.py
with
3 additions
and
2 deletions
couchpotato/core/helpers/encoding.py
+
3
−
2
View file @
b121a2e8
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment