From 6ceadcdb5c9b552f3f1c049aa219bcbff6be26b4 Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 16 Oct 2017 18:29:56 +0200 Subject: [PATCH] Make sure from_disk passes string to numpy (see #1421) If path is a WindowsPath, numpy does not recognise it as a path and as a result, doesn't open the file. https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L369 --- spacy/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/util.py b/spacy/util.py index 50ebc036b..9262b5df4 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -494,7 +494,7 @@ def from_disk(path, readers, exclude): path = ensure_path(path) for key, reader in readers.items(): if key not in exclude: - reader(path / key) + reader(path2str(path / key)) return path