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. > > > > > > > > Farrel Buchinsky > > Google Voice Tel: (412) 567-7870 > > > > > > > > On Wed, Nov 25, 2009 at 17:08, Farrel Buchinsky <fjb...@gmail.com> > wrote: > > > >> Oh OH! Could you please help with a problem that I never used to get. > >> > >> library(RGoogleDocs) > >> ps <-readline(prompt="get the password in ") > >> sheets.con = getGoogleDocsConnection(getGoogleAuth("fjb...@gmail.com", > ps, > >> service ="wise")) > >> ts2=getWorksheets("OnCall",sheets.con) > >> > >> Those opening lines of script used to work flawlesly. Now I get. > >> Error in getDocs(con) : problems connecting to get the list of documents > >> > >> Yet I got it to work earlier while I had been toying with RGoogleData > >> package in another session. Could RGoogleData have opened something for > >> RGoogleDocs to use? > >> > >> Farrel Buchinsky > >> Google Voice Tel: (412) 567-7870 > >> > >> Sent from Pittsburgh, Pennsylvania, United States > >> > >> On Wed, Nov 25, 2009 at 16:34, Farrel Buchinsky <fjb...@gmail.com> > wrote: > >> > >>> That was painless. I had already installed Rtools and had already put > it > >>> on my path. > >>> > >>> Your line worked very well. [Thanks for telling me. However I did it > last > >>> time was worse than sticking daggers in my eyes. ] > >>> install.packages( "RGoogleDocs", repos="http://www.omegahat.org/R", > type="source" > >>> ) > >>> > >>> I now have > >>> Package: RGoogleDocs > >>> Version: 0.4-0 > >>> Title:.... > >>> .... > >>> Maintainer: Duncan Temple Lang <dun...@wald.ucdavis.edu> > >>> Packaged: 2009-10-27 22:10:22 UTC; duncan > >>> Built: R 2.10.0; ; 2009-11-25 20:59:03 UTC; windows > >>> > >>> I am providing the following link to a copy of my RGoogleDocs zipped > >>> directory. It is for people who run R in windows and do not want to go > >>> through the pain of setting things up so that they can install source. > >>> http://dl.dropbox.com/u/23200/RGoogleDocs/RGoogleDocs.zip > >>> > >>> I BELIEVE that if one downloads the zip and extracts it to an empty > >>> directory called RGoogleDocs in one's Library directory then everything > will > >>> work. Please let me know. > >>> > >>> Farrel Buchinsky > >>> Google Voice Tel: (412) 567-7870 > >>> > >>> > >>> > >>> > >>> > > > > [[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. > [[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.