Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
osp
tools.ethertoff
Commits
135dfc47
Commit
135dfc47
authored
Aug 27, 2014
by
eric
Browse files
Will this help against `UnicodeEncodeError` when printing?
Python 3 seems to be worth it just because of these errors…
parent
426fd600
Changes
1
Hide whitespace changes
Inline
Side-by-side
relearn/management/commands/index.py
View file @
135dfc47
...
...
@@ -100,7 +100,7 @@ def query_results_to_template_articles(query_results):
article
=
None
current_uri
=
None
for
s
,
p
,
o
in
query_results
:
print
s
,
p
,
o
print
s
.
encode
(
'utf-8'
),
p
.
encode
(
'utf-8'
),
o
.
encode
(
'utf-8'
)
uri
=
unicode
(
s
).
strip
()
key
=
unicode
(
p
).
strip
()
value
=
unicode
(
o
).
strip
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment