Skip to content
Back to formatted view

Raw Message

Message-ID: <BLU170-W93E9F87F786DDBB10F8ECACC780@phx.gbl>
Date: 2013-07-08T19:10:58Z
From: Mary Huynh
Subject: "error setting certificate" issue in R-studio

Hi all,

I'm a newbie to R and I can't figure out how to fix this error I keep getting in R-studio:


> "error setting certificate verify locations:\n CAfile: \n CApath: none\n"
Error in twInterfaceObj$doAPICall(cmd,params,"GET",...) :
Error: error setting certificate verify locations:
CAfile:
CApath: none


I'm trying to use the twitteR package to gather tweets from the below 
function. It was working fine before, but I can't find a way to fix 
the certificate issue.I tried using 
>download.file(url="curl.haxx.se/ca/cacert.pem",
 destfile="cacert.pem") with>credential$handshake(cainfo = 
system.file("CurlSSL", "cacert.pem", package = "RCurl")) I saw 
recommended on Stack Overflow but it didn't fix the issue.


>TweetFrame <- function(searchTerm, maxTweets)? 
??? {
????? twtList<-searchTwitter(searchTerm,n=maxTweets)
????? #twtList is involved in ?variable? scoping so it only exists within the? 
??????? function? 
????? # searchTerm needs to be a string so use "#hashtag"
? 
????? twtTempFrame<- do.call("rbind", lapply(twtList,as.data.frame))
????? # as.data.frame() coerces each list element into a row
????? # lapply() applies this to all of the elements in twtList
????? # rbind() takes all the rows and puts them together
????? # do.call() gives rbind() all the rows as individual elements
? 
????? return(twtTempFrame[order(as.integer(twtTempFrame$created)), ])
? 
??? }


Thanks in advance for any help!
M