mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
print debugging warning before raising error if model not properly initialized
This commit is contained in:
parent
5121972930
commit
6787e56315
|
@ -970,7 +970,8 @@ class Language:
|
|||
raise ValueError(Errors.E003.format(component=type(proc), name=name))
|
||||
try:
|
||||
doc = proc(doc, **component_cfg.get(name, {}))
|
||||
except KeyError:
|
||||
except KeyError as e:
|
||||
warnings.warn(str(e))
|
||||
raise ValueError(Errors.E109.format(name=name)) from None
|
||||
if doc is None:
|
||||
raise ValueError(Errors.E005.format(name=name))
|
||||
|
|
Loading…
Reference in New Issue
Block a user