Stephen-McDaniel / r-google-analytics

This repository is an export of the final version from the retired Google Code system (code.google.com/p/r-google-analytics).
0 stars 0 forks source link

RCurl proxy conflict #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. set proxy settings with options(RCurlOptions = ...) within Rprofile.site
2. Check with getURL(...) call.
3. load library(RGoogleAnalytics)
4. run all needed steps as described on the product home page up to the 
ga.account <- conf$GetAccounts() line
5. Get "Error in function (type, msg, asError = TRUE)  : couldn't connect to 
host"
6. Find out that RCurl proxy settings are broken.

It seems that running library(RGoogleAnalytics) overwites RCurlOptions (

Original issue reported on code.google.com by dmytro.b...@kyivstar.net on 4 Aug 2014 at 3:03

GoogleCodeExporter commented 9 years ago
I've fixed this by adding a line to pick predefined RCurlOptions:
  PreRCurlOptions <- getOption("RCurlOptions")
  options(RCurlOptions = c(PreRCurlOptions, list(capath = system.file("CurlSSL",
                                                   "cacert.pem", 
                                                   package = "RCurl"),
                              ssl.verifypeer = FALSE)))

Original comment by postma...@gmail.com on 11 Aug 2014 at 6:00