Reading from Google Docs
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 <fjbuch at 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("fjbuch at 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 <fjbuch at 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 <duncan at 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 at 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.