mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Raise correct error
This commit is contained in:
parent
848e47669e
commit
e1e73936b1
|
@ -155,7 +155,7 @@ def get_model_meta(path):
|
||||||
meta = read_json(meta_path)
|
meta = read_json(meta_path)
|
||||||
for setting in ['lang', 'name', 'version']:
|
for setting in ['lang', 'name', 'version']:
|
||||||
if setting not in meta:
|
if setting not in meta:
|
||||||
raise IOError('No %s setting found in model meta.json' % setting)
|
raise ValueError('No %s setting found in model meta.json' % setting)
|
||||||
return meta
|
return meta
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user