Handling errors gracefully upon spotlight errors
tsaltena opened this issue · 2 comments
My local server is returning errors due to this issue:
dbpedia-spotlight/dbpedia-spotlight-model#26
I did not find time yet to investigate whether that XML issue can be addressed, but for a testing setup locally this is causing problems when I'm batch feeding documents to a spacy pipeline with dbpedia.
I wrapped the request in a quick try/except statement in an own fork, but perhaps this is something to address is this library directly?
Hi @tsaltena !
Thank you very much for reporting this issue.
That's surely something that needs to be configurable, e.g. setting the error tolerance while instantiating the pipeline stage:
ignore_exceptions = True
to ignore the exceptions and go onignore_exceptions = False
to be interrupted by exceptions
This parameter could be set within the nlp.add_pipe
function call in the config
parameter.
I will update this issue when this is implemented
The above has been implemented in version 0.2.2.
As in the documentation, you can use the parameter raise_http_errors
to set a error-tolerant mode.
Martino