expersso / OECD

Reproducible and programmatic access to OECD data
126 stars 20 forks source link

unsafe legacy renegotiation disabled #29

Open raffaem opened 10 months ago

raffaem commented 10 months ago

I installed from CRAN.

I get the following error when I try to download the list of datasets

> datasets <- get_datasets()
Error in curl::curl_fetch_memory(url, handle = handle) : 
  OpenSSL/3.1.4: error:0A000152:SSL routines::unsafe legacy renegotiation disabled
lindamaok899 commented 10 months ago

I also am facing the same error

luifrancgom commented 9 months ago

You can try the following option using the package rsdmx where you can find the example I point out in https://github.com/opensdmx/rsdmx/wiki#package_overview > #####Data Structures (Key Families). It is slower that the packages used in the function get_datasets() but it works:

library(rsdmx)
library(tibble)
dsUrl <- "http://stats.oecd.org/restsdmx/sdmx.ashx/GetDataStructure/ALL"
ds <- readSDMX(dsUrl)
dsdf <- as_tibble(ds)

dsdf |> glimpse()
#> Rows: 1,691
#> Columns: 11
#> $ id                  <chr> "QNA", "PAT_IND", "TEL", "SNA_TABLE11", "LFS_SEXAG…
#> $ agencyID            <chr> "OECD", "OECD", "OECD", "OECD", "OECD", "OECD", "O…
#> $ Name.fr             <chr> "Comptes nationaux trimestriels", "Brevets - Indic…
#> $ Name.en             <chr> "Quarterly National Accounts", "Patent indicators"…
#> $ version             <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ uri                 <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ urn                 <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ isExternalReference <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ isFinal             <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ validFrom           <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ validTo             <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…

Created on 2023-12-06 with reprex v2.0.2

Also take into account that OCDE stat is changing the API and there is a new website, https://data-explorer.oecd.org/.