-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API request to dbpedia gives [SSL: CERTIFICATE_VERIFY_FAILED] #23
Comments
Hi @neostrange, spacy-dbpedia-spotlight/spacy_dbpedia_spotlight/entity_linker.py Lines 218 to 219 in 5c5802c
return requests.post(
f'{endpoint}/{self.process}', headers={'accept': 'application/json'}, verify=False, data=params) I could an option in the configuration of the pipeline to allow ignoring verification more easily. Best, |
You can now install the new release pip install --upgrade spacy-dbpedia-spotlight The following is a snippet of the configuration to skip SSL verifiication: import spacy
nlp = spacy.blank('en')
# during the pipeline instantiation (e.g. custom dbpedia_rest_endpoint with HTTPS but self-signed certificate)
nlp.add_pipe('dbpedia_spotlight', config={'verify_ssl': False})
# or afterwards
nlp.get_pipe('dbpedia_spotlight').verify_ssl = False
# this will generate a warning, but will not break your processing (e.g. in a loop)
doc = nlp('Google LLC is an American multinational technology company.')
print(doc.ents)
# you can suppress warnings with this
import requests
from urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
# and now no warnings
doc = nlp('Google LLC is an American multinational technology company.')
print(doc.ents) Let me know if this works for you. Best, |
Hi Martino, Thank you so much for your response. As per your solution, how can I install the plugin using pip? It would be great if you add a configuration parameter to turn SSL validation disabled. Regards, |
Hi @neostrange , Try with the upgrade and then config parameter as in my last message and let me know if it works correctly! Best, |
Hi Martino, I tried but it give me the following error: ConfigValidationError:
Regards, |
Yes, I think we are 👍 |
Have you tried upgrading the package with What is the result of the following? import spacy_dbpedia_spotlight
print(spacy_dbpedia_spotlight.__version__) If it is not 0.2.6, it means that for some reason you are not getting the updated library from pypi: https://pypi.org/project/spacy-dbpedia-spotlight/ |
Yes, you are right, the pip couldn't upgrade the library in the python virtual environment at my side. I am trying to fix it and will post here the result. |
Hi,
I have utilized the spacy-dbpedia-spotlight plugin without any issues for a considerable period of time. However, my code encountered an error yesterday.
Can you please look into this why it suddenly start appearing?
I am running spacy in a python venv virtual environment in ubuntu.
The text was updated successfully, but these errors were encountered: