artemklevtsov / RGA

A Google Analytics API client for R
http://cran.r-project.org/package=RGA
32 stars 13 forks source link

Error in curl::curl_fetch_memory(url, handle = handle) : Couldn't connect to server #25

Closed Ashkan33 closed 8 years ago

Ashkan33 commented 8 years ago

Hi,

I get this error from time to time:

(It seems to be a curl issue)

curl::curl_fetch_memory(url, handle = handle) 
18 request_fetch.write_memory(req$output, req$url, handle) 
17 request_fetch(req$output, req$url, handle) 
16 request_perform(req, hu$handle$handle) 
15 GET(validate_url, accept_json()) 
14 validate_oauth2.0(self$endpoint, self$credentials) 
13 token$validate() 
12 validate_token(token) 
11 api_request(get_url(path), token) 
10 get_mgmt(path, token) 
9 get_profile(profile$accountId, profile$webPropertyId, profile$profileId, 
    token) 
8 get_report("data/ga", query, token, fetch.by) 
7 get_ga(profileId = profileId, start.date = "2005-01-01", end.date = "today", 
    metrics = "ga:sessions", dimensions = "ga:date", filters = "ga:sessions>0", 
    max.results = 1L, token = token) 
6 withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning")) 
5 suppressWarnings(get_ga(profileId = profileId, start.date = "2005-01-01", 
    end.date = "today", metrics = "ga:sessions", dimensions = "ga:date", 
    filters = "ga:sessions>0", max.results = 1L, token = token)) 
4 firstdate(id) 
3 FUN(X[[i]], ...) 
2 lapply(properties.data$id, function(id) {
    first.date <- firstdate(id)
    first.date <- days[day_index]
    last.date <- days[day_index + 1] ... 
1 do.call(rbind.fill, lapply(properties.data$id, function(id) {
    first.date <- firstdate(id)
    first.date <- days[day_index]
    last.date <- days[day_index + 1] ... 
``
artemklevtsov commented 8 years ago

How can I reproduce it?