Public bug reported: I am getting the following error for this code;
library(fImport) x <- fredImport(query = "MPRIME") --2016-07-25 15:51:22-- http://research.stlouisfed.org/fred2/series/MPRIME/downloaddata/MPRIME.txt Resolving research.stlouisfed.org... 65.89.18.120 Connecting to research.stlouisfed.org|65.89.18.120|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt [following] --2016-07-25 15:51:23-- https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt Resolving fred.stlouisfed.org... 65.89.18.120 Connecting to fred.stlouisfed.org|65.89.18.120|:443... connected. ERROR: certificate common name “research.stlouisfed.org” doesn’t match requested host name “fred.stlouisfed.org”. To connect to fred.stlouisfed.org insecurely, use ‘--no-check-certificate’. Read 0 items Warning message: In download.file(url = url, destfile = tmp) : download had nonzero exit status I believe this is a bug, a possible fix could be in file R/import-fred.R line 84, add the argument: extra = "--no-check-certificate" to the function download.file(), as suggested in the error message, i.e. download.file(url = url, destfile = tmp, extra = "--no-check- certificate") Which should bypass the certification of the url. I have written this into a function fredImport2 to test and this is the response; x <- fredImport2(query = "MPRIME") --2016-07-25 15:57:05-- http://research.stlouisfed.org/fred2/series/MPRIME/downloaddata/MPRIME.txt Resolving research.stlouisfed.org... 65.89.18.120 Connecting to research.stlouisfed.org|65.89.18.120|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt [following] --2016-07-25 15:57:05-- https://fred.stlouisfed.org/series/MPRIME/downloaddata/MPRIME.txt Resolving fred.stlouisfed.org... 65.89.18.120 Connecting to fred.stlouisfed.org|65.89.18.120|:443... connected. WARNING: certificate common name “research.stlouisfed.org” doesn’t match requested host name “fred.stlouisfed.org”. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/plain] Saving to: “/tmp/RtmpRzvEEZ/file384c1e7da42” 0K .......... ..... 144K=0.1s 2016-07-25 15:57:05 (144 KB/s) - “/tmp/RtmpRzvEEZ/file384c1e7da42” saved [16117] Read 824 items (using ‘fImport’ version 3000.82, on RStudio Server, Platform: x86_64-pc-linux-gnu (64-bit), Running under: CentOS release 6.3 (Final)) ** Affects: fimport (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1606279 Title: fredImports not working. Error: certificate common name doesn't match requested host name To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fimport/+bug/1606279/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs