From df886901777fa9bca96346b2709dd2a225adf572 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 24 Sep 2016 21:13:15 +0200 Subject: [PATCH] Fix encoding of path variable --- spacy/vocab.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 29b4544cd..a93163d78 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -241,6 +241,8 @@ cdef class Vocab: return tokens def dump(self, loc): + if hasattr(loc, 'as_posix'): + loc = loc.as_posix() cdef bytes bytes_loc = loc.encode('utf8') if type(loc) == unicode else loc cdef CFile fp = CFile(bytes_loc, 'wb')