From 70ff0639b5310150c8f985775483fdcdce76f2db Mon Sep 17 00:00:00 2001 From: JM Date: Tue, 20 Dec 2016 18:21:05 +0100 Subject: [PATCH] Fixed missing vec_path declaration that was failing if 'add_vectors' was set Added vec_path variable declaration to avoid accessing it before assignment in case 'add_vectors' is in overrides. --- spacy/en/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spacy/en/__init__.py b/spacy/en/__init__.py index d4a371b2b..56cf4d184 100644 --- a/spacy/en/__init__.py +++ b/spacy/en/__init__.py @@ -44,6 +44,7 @@ def _fix_deprecated_glove_vectors_loading(overrides): else: path = overrides['path'] data_path = path.parent + vec_path = None if 'add_vectors' not in overrides: if 'vectors' in overrides: vec_path = match_best_version(overrides['vectors'], None, data_path)