From 002c7f8f43c273234c6620c2b8a905508839d5d3 Mon Sep 17 00:00:00 2001 From: Mike Qin <1mike12@gmail.com> Date: Wed, 10 Oct 2018 12:10:14 -0400 Subject: [PATCH] =?UTF-8?q?fix=20UnicodeDecodeError=20failing=20on=20Spani?= =?UTF-8?q?sh=20name=20=C3=81lvarez?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- char-rnn-classification/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/char-rnn-classification/data.py b/char-rnn-classification/data.py index 0ac6336..5ce62f3 100644 --- a/char-rnn-classification/data.py +++ b/char-rnn-classification/data.py @@ -18,7 +18,7 @@ def unicodeToAscii(s): # Read a file and split into lines def readLines(filename): - lines = open(filename).read().strip().split('\n') + lines = open(filename, encoding="utf8").read().strip().split('\n') return [unicodeToAscii(line) for line in lines] # Build the category_lines dictionary, a list of lines per category