banboo-data / RCriteo

Loading Criteo Campaign Data into R
http://jburkhardt.github.io/RCriteo/
Other
6 stars 3 forks source link

Error in xmlChildren(x)[[...]] : subscript out of bounds #7

Closed chawannut157 closed 8 years ago

chawannut157 commented 8 years ago

I can run the code without any problem except for the criteoData command which return the following error"Error in xmlChildren(x)[[...]] : subscript out of bounds". Please see below for the full result.

> library(RCriteo) Warning message: package ‘RCriteo’ was built under R version 3.2.5

> options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))

> authToken <- doCriteoAuth(user = "*****", password = "*****" , company = "company", app = "appName", version = "3.6")

> getCriteoCampaigns(authToken = authToken, appToken = '****')

> jobID <- scedCriteoReport(authToken = authToken, appToken = '****', campaigns = c("7742"), metrics = c("clicks", "impressions", "cost", "sales"), start = "2016-07-05", end = "2016-07-06")

jobID [1] "1010694470" attr(,"metrics") [1] "clicks" "impressions" "cost" "sales"

> data <- criteoData(authToken = authToken, appToken = '****', jobID = jobID) Error in xmlChildren(x)[[...]] : subscript out of bounds

jburkhardt commented 8 years ago

Thanks! I guess the campaign does not have any data in the specified date range. Could you verify this please?

jburkhardt commented 8 years ago

In the meanwhile I updated the package with enhancements concerning date range limits and NULL data handling. Please update:

require(devtools)
install_github('jburkhardt/RCriteo')

I hope you are fine now!

chawannut157 commented 8 years ago

Thanks ! It works properly now. As you said, null values are the problem as I also query from campaigns that are not running.