From 6eb73a095f7023960560a58282c308bbb0661033 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 21 Oct 2016 01:44:10 +0200 Subject: [PATCH] Fix JSON in tagger --- spacy/tagger.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tagger.pyx b/spacy/tagger.pyx index b2bc344bb..c98b06d3a 100644 --- a/spacy/tagger.pyx +++ b/spacy/tagger.pyx @@ -109,7 +109,7 @@ cdef class Tagger: # support old data. path = path if not isinstance(path, basestring) else pathlib.Path(path) if (path / 'templates.json').exists(): - with (path / 'templates.json').open() as file_: + with (path / 'templates.json').open('r', encoding='utf8') as file_: templates = json.load(file_) elif require: raise IOError(