From ebf5a3ce599be517414b136a2b91b8895e32c1d8 Mon Sep 17 00:00:00 2001 From: Dan O'Huiginn Date: Thu, 17 Aug 2017 15:15:08 +0000 Subject: [PATCH] Allow loading with python < 3.6 Don't rely on recent python features to load models Fixes Issue #1271 --- spacy/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/util.py b/spacy/util.py index ccb81fbed..d83fe3416 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -113,7 +113,7 @@ def load_model(name, **overrides): def load_model_from_link(name, **overrides): """Load a model from a shortcut link, or directory in spaCy data path.""" init_file = get_data_path() / name / '__init__.py' - spec = importlib.util.spec_from_file_location(name, init_file) + spec = importlib.util.spec_from_file_location(name, str(init_file)) try: cls = importlib.util.module_from_spec(spec) except AttributeError: