diff --git a/spacy/util.py b/spacy/util.py index 645f8b3f7..9d839a25a 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -169,8 +169,8 @@ def get_model_meta(path): raise IOError("Could not read meta.json from %s" % meta_path) meta = read_json(meta_path) for setting in ['lang', 'name', 'version']: - if setting not in meta: - raise ValueError('No %s setting found in model meta.json' % setting) + if setting not in meta or not meta[setting]: + raise ValueError('No valid '%s' setting found in model meta.json' % setting) return meta