From 0c28cd69be4bf7ac3185e90078a670d1bada97fa Mon Sep 17 00:00:00 2001 From: Quan Zhou Date: Fri, 21 Jan 2022 17:47:12 +0100 Subject: [PATCH] [enrich] Fix urllib3.exceptions.SSLError for 'enrich_feelings'. This code fixes the SSLError when running the `enrich_feelings` study available for github2. The error: ``` urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852) ``` Signed-off-by: Quan Zhou --- grimoire_elk/enriched/enrich.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grimoire_elk/enriched/enrich.py b/grimoire_elk/enriched/enrich.py index e8ceef186..8c6bdeb5c 100644 --- a/grimoire_elk/enriched/enrich.py +++ b/grimoire_elk/enriched/enrich.py @@ -2096,7 +2096,8 @@ def enrich_feelings(self, ocean_backend, enrich_backend, attributes, nlp_rest_ur logger.info("[enrich-feelings] Start study on {} with data from {}".format( anonymize_url(self.elastic.index_url), nlp_rest_url)) - es = ES([self.elastic_url], timeout=3600, max_retries=50, retry_on_timeout=True, verify_certs=False) + es = ES([self.elastic_url], timeout=3600, max_retries=50, retry_on_timeout=True, + verify_certs=self.elastic.requests.verify, connection_class=RequestsHttpConnection) search_fields = [attr for attr in attributes] search_fields.extend([uuid_field]) page = es.search(index=enrich_backend.elastic.index,