-
Notifications
You must be signed in to change notification settings - Fork 13
as.request error #43
Comments
Please update all packages and try again. |
Besides the RGA package, what other packages will need to be updated as well? |
I have updated the packages and still get the error from time to time. Not sure what is causing it since the packages are updated. |
Please post the |
> traceback()
9: as.request(config)
8: request_build("GET", hu$url, as.request(config), ...)
7: GET(url, config = config, accept_json())
6: api_request(get_url(path), token)
5: get_mgmt(path, token)
4: get_profile(profile$accountId, profile$webPropertyId, profile$profileId,
token)
3: get_report("data/ga", query, token, fetch.by)
2: get_ga(profileId = "ga:xxxxxxx", start.date = stdate, end.date = enddate,
metrics = c("ga:sessions", "ga:pageviews", "ga:pageLoadTime",
"ga:timeonPage"), dimensions = c("ga:date", "ga:dimension13",
"ga:dimension14"), sort = sort, filters = filters, segment = NULL,
samplingLevel = NULL, start.index = NULL, max.results = NULL,
include.empty.rows = NULL, fetch.by = NULL, ga_token)
1: rbind(Opinion_Users2015 <- get_ga(profileId = "ga:xxxxxxxx",
start.date = stdate, end.date = enddate, metrics = c("ga:sessions",
"ga:pageviews", "ga:pageLoadTime", "ga:timeonPage"),
dimensions = c("ga:date", "ga:dimension13", "ga:dimension14"),
sort = sort, filters = filters, segment = NULL, samplingLevel = NULL,
start.index = NULL, max.results = NULL, include.empty.rows = NULL,
fetch.by = NULL, ga_token)[1, c(1:7)]) at #12
> |
This is what happens when it throws another as.request error as well. Batch processing mode enabled.
Fetch data by day: from 2015/10/01 to 2015/10/31.
|============================================================================| 100%
Error in vapply(x, function(x) as.numeric(x[[name]]), numeric(1)) :
values must be length 1,
but FUN(X[[1]]) result is length 0
In addition: There were 31 warnings (use warnings() to see them)
> traceback()
5: vapply(x, function(x) as.numeric(x[[name]]), numeric(1))
4: sum_by(pages, "sampleSize")
3: fetch_by(path, query, by, token)
2: get_report("data/ga", query, token, fetch.by)
1: get_ga(profileId = "ga:94268785", start.date = "2015/10/01",
end.date = "2015/10/31", metrics = c("ga:users", "ga:sessions",
"ga:pageviews", "ga:pageLoadTime", "ga:timeonPage"),
dimensions = c("ga:date", "ga:dimension13", "ga:dimension14"),
sort = "-ga:users", filters = "ga:dimension7==national",
segment = NULL, samplingLevel = "FASTER", start.index = 1,
max.results = 1, include.empty.rows = NULL, fetch.by = "day",
ga_token) |
Try the latest git-version of the |
I have updated all packages and now I am getting this error as well.
|
I encountered this issue today as well. It runs for awhile before encountering the error Batch processing mode enabled. |
Timlri, I think that it may be something with the dates. If you attempt to do only 30days in batch mode by day the code seldom breaks. I then have been utilizing the rbind function to pull the data together into one matrix. |
Thanks. If I simply re-run the script it often completes okay with the given date range. And if it does fail, it usually fails either earlier or later - not at the same point. |
Guys, can I help you? Does someone have a reproducible example of code? |
Here is the traceback code that I received from R. Batch processing mode enabled.
|
And again. Batch processing mode enabled.
I then run the code a few seconds to a minute later and it will work from time to time. Sometimes the code will break again as well. |
Here is the traceback when the code executes properly. Batch processing mode enabled.
|
Could the issue be that RGA is not compatible with the newer versions of R such as 3.3.0 |
I got this error today for the first time. Been using RGA since more than a year. didn't change date format or the date range, neither did I update any package. Please confirm why this happens? |
Hello? This keeps happening from time to time. Is this package being maintained? |
Here's the code I have and the error happens from time to time:
|
We execute this code through a cron job and the cron executes a second time if the first attempt was not successful. The error happened both the times today. Then, executed the script manually a third time and it worked.We really need a solution to this |
Looking through the traceback output provided above, I would suggest looking for the bug somewhere around here:
|
Hi, I am getting the following error when utilizing the RGA package in R:
Has something changed in the Google Analtyics API that is causing this issue?
The text was updated successfully, but these errors were encountered: