From dbda6c27fa3be7dda7a9cebe9196f4973c85a488 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 23 Jul 2015 14:52:30 +0200 Subject: [PATCH] * Fix python3 error --- spacy/cfile.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/cfile.pyx b/spacy/cfile.pyx index 01db25bcb..6346302b9 100644 --- a/spacy/cfile.pyx +++ b/spacy/cfile.pyx @@ -6,7 +6,7 @@ cdef class CFile: if isinstance(mode, unicode): mode_str = mode.encode('ascii') cdef bytes bytes_loc = loc.encode('utf8') if type(loc) == unicode else loc - self.fp = fopen(bytes_loc, mode) + self.fp = fopen(bytes_loc, mode_str) if self.fp == NULL: raise IOError("Could not open binary file %s" % bytes_loc) self.is_open = True