cloudyr / MTurkR

R Client for the MTurk Requester API
https://cloud.r-project.org/package=MTurkR
91 stars 18 forks source link

AccountBalance fails on linux #39

Closed kirstin-rhys closed 10 years ago

kirstin-rhys commented 10 years ago

Note that this is apparently due to a bug in RCurl on linux, for example,

install_github(repo="MTurkR", username="leeper")

produces the same error.

R> AccountBalance() Error in function (type, msg, asError = TRUE) :

R> traceback() 6: fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", "error", "condition"))) 5: function (type, msg, asError = TRUE) { if (!is.character(type)) { i = match(type, CURLcodeValues) typeName = if (is.na(i)) character() else names(CURLcodeValues)[i] } typeName = gsub("^CURLE_", "", typeName) fun = (if (asError) stop else warning) fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", "error", "condition"))) }(77L, "", TRUE) 4: .Call("R_curl_easy_perform", curl, .opts, isProtected, .encoding, PACKAGE = "RCurl") 3: curlPerform(url = host, httpheader = c(Content-Type = "application/x-www-form-urlencoded"), postfields = urlparameters, followlocation = 1L, ssl.verifypeer = 1L, ssl.verifyhost = 2L, cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"), writefunction = h$update) 2: request(keyid, auth$operation, auth$signature, auth$timestamp, GETparameters, log.requests = log.requests, sandbox = sandbox, validation.test = validation.test) 1: AccountBalance()

R> sessionInfo() R version 3.1.0 (2014-04-10) Platform: x86_64-pc-linux-gnu (64-bit)

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] MTurkR_0.4.3

loaded via a namespace (and not attached): [1] compiler_3.1.0 digest_0.6.4 RCurl_1.95-4.1 tools_3.1.0 XML_3.98-1.1

leeper commented 10 years ago

Did you load your AWS API Access Key ID and Secret Key via either credentials() or setting them manually with options?

kirstin-rhys commented 10 years ago

via credentials.

This could be a libcurl nss issue:

see: https://github.com/hadley/devtools/issues/467

leeper commented 10 years ago

Okay, I will leave this open for the time being but it sounds like it's a lower-level issue and not something I can address in MTurkR.