Is anyone using RGoogleDocs? If so have you used it in the last few weeks and is it working as it used to. Look at the problem I have run into. Farrel Buchinsky
On Sat, Nov 28, 2009 at 14:25, Farrel Buchinsky <fjb...@gmail.com> wrote: > Thank you for the interest in my problem. > > > I have been using the same script (see below) successfully for the past 5 > months and now all of a sudden I have problems. Could R be > functioning differently under 2.10? Could Google have changed their > authentication procedures? In other words are you currently able to read > spreadsheets into R the way you used to? > > library(RGoogleDocs) > ps <-readline(prompt="get the password in ") > sheets.con = getGoogleDocsConnection(getGoogleAuth("fjb...@gmail.com", ps, > service ="wise")) > ts2=getWorksheets("OnCall",sheets.con) > Error in getDocs(con) : problems connecting to get the list of documents > > I used options(error = recover) to troubleshoot but alas I am none the > wiser (no pun intended). I am pasting the output here. Can you see where the > problem is coming from? [By the way, I changed my script temporarily to > service="writely" and the getDocs command worked. If I remember correctly > RGoogleDocs had a problem about 6 months ago whereby one could list the > documents but not the spreadsheets and then you fixed it. ] > > Enter a frame number, or 0 to exit > > 1: getWorksheets("OnCall", sheets.con) > 2: getDocs(con) > > Selection: 2 > Called from: eval(expr, envir, enclos) > Browse[1]> objects() > [1] "as.data.frame" "auth" "curl" "folders" "h" > "status" "what" "x" > Browse[1]> body() > { > if (what %in% names(GoogleURLs)) > what = GoogleURLs[what] > else if (is(curl, "GoogleSpreadsheetsConnection")) > what = GoogleURLs["spreadsheets"] > curlSetOpt(customrequest = "GET", curl = curl) > h = basicTextGatherer() > if (folders) > what = paste(what, "showfolders=true", sep = "?") > x = getURL(what, curl = curl, headerfunction = h$update, > followlocation = TRUE, ...) > status = parseHTTPHeader(h$value()) > if (floor(as.numeric(status[["status"]])/100) != 2) > stop("problems connecting to get the list of documents") > doc = xmlParse(x, asText = TRUE) > if (toupper(xmlName(xmlRoot(doc))) == "HTML") > stop("Can't get document list. Is the connection still valid? > Perhaps initialize a new connection.") > convertDocList(doc, curl, as.data.frame) > } > Browse[1]> status > > WWW-Authenticate > Content-Type > "GoogleLogin realm=\"http://www.google.com/accounts/ClientLogin\", > service=\"writely\"" > "text/html; charset=UTF-8" > > Date > Expires > "Sat, 28 Nov 2009 > 19:04:22 GMT" "Sat, > 28 Nov 2009 19:04:22 GMT" > > Cache-Control > X-Content-Type-Options > > "private, max-age=0" > "nosniff" > > X-XSS-Protection > X-Frame-Options > > "0" > "SAMEORIGIN" > > Server > Transfer-Encoding > > "GFE/2.0" > "chunked" > > status > statusMessage > > "401" > "Token invalid" > > > > Farrel Buchinsky > Google Voice Tel: (412) 567-7870 > > > > On Sat, Nov 28, 2009 at 12:45, Duncan Temple Lang <dun...@wald.ucdavis.edu > > wrote: > >> >> >> Farrel Buchinsky wrote: >> > Please oh please could someone help me or at least confirm that they are >> > having the same problem. >> > >> > Why am I getting the error message from RGoogleDocs >> > >> >> getDocs(sheets.con) >> > Error in getDocs(sheets.con) : >> > problems connecting to get the list of documents >> >> You are using a connection to the wise service (for worksheets) >> to get the list of documents from the document service. >> >> If you call getDocs() with an connection to writely, I >> imagine it will succeed. >> >> So you have a token, but it is for the wrong thing. >> >> > >> > >> > How do I troubleshoot? >> >> The first thing is to learn about debugging in R. >> For example, >> >> options(error = recover) >> >> getDocs(sheets.con) >> >> The error occurs and you are presented with a menu prompt that allows you >> to select the call frame of interest. There is only one - getDocs(). >> Enter 1 <Return>. Now you have an R prompt that allows you to explore >> the call frame. >> >> objects() >> >> body() >> >> >> Take a look at status >> >> status >> >> >> WWW-Authenticate >> "GoogleLogin realm=\"http://www.google.com/accounts/ClientLogin\", >> service=\"writely\"" >> >> Content-Type >> "text/html; >> charset=UTF-8" >> >> Date >> "Sat, 28 Nov 2009 >> 17:36:16 GMT" >> >> Expires >> "Sat, 28 Nov 2009 >> 17:36:16 GMT" >> >> Cache-Control >> >> "private, max-age=0" >> >> X-Content-Type-Options >> >> "nosniff" >> >> X-XSS-Protection >> >> "0" >> >> X-Frame-Options >> >> "SAMEORIGIN" >> >> Server >> >> "GFE/2.0" >> >> Transfer-Encoding >> >> "chunked" >> >> status >> >> "401" >> >> statusMessage >> >> "Token invalid" >> >> >> This is the parsed header of the reply from the GoogleDocs server. >> >> x contains the result of the query and it is an HTML document with the >> (same) error message. >> >> >> [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.