From 1c39f4c1940fdef879a24ea375b0943c96c76fdf Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 24 Dec 2018 09:54:59 +1000 Subject: [PATCH] deck fix print statements may be running in ascii environment this should probably use the collection log in the future --- anki/decks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/anki/decks.py b/anki/decks.py index 29a698806..55fcf58b1 100644 --- a/anki/decks.py +++ b/anki/decks.py @@ -449,13 +449,13 @@ class DeckManager: for deck in decks: # two decks with the same name? if deck['name'] in names: - print("fix duplicate deck name", deck['name']) + print("fix duplicate deck name", deck['name'].encode("utf8")) deck['name'] += "%d" % intTime(1000) self.save(deck) # ensure no sections are blank if not all(deck['name'].split("::")): - print("fix deck with missing sections", deck['name']) + print("fix deck with missing sections", deck['name'].encode("utf8")) deck['name'] = "recovered%d" % intTime(1000) self.save(deck) @@ -463,7 +463,7 @@ class DeckManager: if "::" in deck['name']: immediateParent = "::".join(deck['name'].split("::")[:-1]) if immediateParent not in names: - print("fix deck with missing parent", deck['name']) + print("fix deck with missing parent", deck['name'].encode("utf8")) self._ensureParents(deck['name']) names.add(immediateParent)