PolMine / dbpedia

R Wrapper for Corpus Annotation with DBpedia Spotlight
3 stars 0 forks source link

api.dbpedia-spotlight.org SSL certificate has expired #19

Closed ablaette closed 11 months ago

ablaette commented 11 months ago

When running this code ...

library(quanteda)
library(dplyr)

options(dbpedia.lang = "en")
options(dbpedia.endpoint = "http://api.dbpedia-spotlight.org/en/annotate")

uritab <- data_char_ukimmig2010 |>
  corpus() |>
  get_dbpedia_uris()

I get this error:

Error in curl::curl_fetch_memory(url, handle = handle) : SSL peer certificate or SSH remote key was not OK: [api.dbpedia-spotlight.org] SSL certificate problem: certificate has expired

ablaette commented 11 months ago

A temporary solution for testing purposes is to run this snippet before get_dbpedia_uris()

httr::set_config(httr::config(ssl_verifypeer = 0L))
ablaette commented 11 months ago

The SSL certificate has been update, the issue is solved for the time being. If it re-occurrs, there should be a test with a warning message and the httr::set_config() workaround.