Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropbox_auth() having issues with verify #2

Open
hmaeda opened this issue Sep 13, 2012 · 6 comments
Open

dropbox_auth() having issues with verify #2

hmaeda opened this issue Sep 13, 2012 · 6 comments

Comments

@hmaeda
Copy link

hmaeda commented Sep 13, 2012

dropbox_credentials <- dropbox_auth()

Error in if (verify) { : argument is not interpretable as logical

with a traceback that looks like:

2: handshake(dropbox_oa, post = FALSE, verify = paste("Use the Web browser to grant permission to this code", "to access Dropbox on your behalf.\nWhen you see 'Success!', hit enter in R", sep = "\n")) at dropbox_auth.r#48
1: dropbox_auth()

@karthik
Copy link
Owner

karthik commented Sep 13, 2012

Thanks for catching this. Remove the current version of ROAuth that you have first (there are a few different versions of .0.9.2 out there with small differences). Restart R and make sure library(ROAuth) does not find another install of the package. remove.packages() does not always work so you may have to go into ~/Library/R/x.y/library where x.y is the version of R you are currently using. Once it's deleted, run the following:

library(devtools)
install_github('ROAUth', 'duncantl')

Then dropbox_auth() should work correctly. Let me know if that worked for you (I just replicated the issue and this fix worked for me).

@hmaeda
Copy link
Author

hmaeda commented Sep 13, 2012

Ah brilliant! that works thanks! was going to say perhaps the README markdown file should be updated but have just seen that you have already done that! Cool.

On a separate note, when using the db.read.csv function why is the first column removed for the output? was there a particular reason for this? the code can be viewed below...i.e. it uses data[,-1] for the final output...is that intentional?

> db.read.csv
function(dropbox_credentials, file_to_get,
    header = TRUE) {
    file <- dropbox_get(dropbox_credentials, file_to_get)
    data <- read.csv(textConnection(file), header)
    data2 <- data.frame(data[,-1])
    names(data2) <- names(data)[-1]
    return(data2)
}

@karthik
Copy link
Owner

karthik commented Sep 13, 2012

Glad it works! I've updated the README also.

Re: db.read.csv, I have not fully fleshed out that function and may have included that removal during some testing phase. I'll get it fixed up shortly. Thanks for catching that too. Cheers!

On Thursday, September 13, 2012 at 3:05 PM, hmaeda wrote:

Ah brilliant! that works thanks! was going to say perhaps the README markdown file should be updated but have just seen that you have already done that! Cool.
On a separate note, when using the db.read.csv function why is the first column removed for the output? was there a particular reason for this? the code can be viewed below...i.e. it uses data[,-1] for the final output...is that intentional?

db.read.csv function(dropbox_credentials, file_to_get, header = TRUE) { file <- dropbox_get(dropbox_credentials, file_to_get) data <- read.csv(textConnection(file), header) data2 <- data.frame(data[,-1]) names(data2) <- names(data)[-1] return(data2) }


Reply to this email directly or view it on GitHub (#2 (comment)).

@hmaeda
Copy link
Author

hmaeda commented Sep 13, 2012

Nice package btw, I'm surprised you haven't put it up on CRAN, or is it a bit too much of a commitment to maintain?

@karthik
Copy link
Owner

karthik commented Sep 13, 2012

No. We cannot put it on CRAN without all dependencies also being on CRAN. Just waiting on ROAuth to get updated and we'll get it on there asap!

On Thursday, September 13, 2012 at 3:15 PM, hmaeda wrote:

Nice package btw, I'm surprised you haven't put it up on CRAN, or is it a bit too much of a commitment to maintain?


Reply to this email directly or view it on GitHub (#2 (comment)).

@hmaeda hmaeda closed this as completed Sep 14, 2012
@hmaeda hmaeda reopened this Sep 14, 2012
@hmaeda
Copy link
Author

hmaeda commented Sep 14, 2012

I seem to be going backwards actually now the dropbox_auth function is providing an error saying that I am Unauthorized...depsite putting in the correct keys etc.

have a look at this output...this was done after removing both ROAuth and also rDrop packages.

The keys in my .Rprofile page are accurate...so im a bit confused as to why this is happening...


R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

> library(devtools)

Attaching package: ‘devtools’

The following object(s) are masked _by_ ‘.GlobalEnv’:

    test

> install_github('ROAUth', 'duncantl')
Installing github repo(s) ROAUth/master from duncantl
Installing ROAUth.zip from https://github.com/duncantl/ROAUth/zipball/master
Installing ROAuth
* checking for file '/private/var/folders/N3/N3c0k2wGFciTmmsVNCCRE++++TI/-Tmp-/RtmpGLj9UP/duncantl-ROAuth-54c9ef1/DESCRIPTION' ... OK
* preparing 'ROAuth':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'ROAuth_0.92.0.tar.gz'

* installing *source* package 'ROAuth' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x86_64

* DONE (ROAuth)
> install_github("rDrop", "karthikram")
Installing github repo(s) rDrop/master from karthikram
Installing rDrop.zip from https://github.com/karthikram/rDrop/zipball/master
Installing rDrop
* checking for file '/private/var/folders/N3/N3c0k2wGFciTmmsVNCCRE++++TI/-Tmp-/RtmpGLj9UP/karthikram-rDrop-85c66c5/DESCRIPTION' ... OK
* preparing 'rDrop':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'rDrop_0.3.tar.gz'

* installing *source* package 'rDrop' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x86_64

* DONE (rDrop)
> library(rDrop)
Loading required package: RJSONIO
Loading required package: RCurl
Loading required package: bitops
Loading required package: ROAuth
Loading required package: digest
Loading required package: plyr
Loading required package: Rcpp
Loading required package: colorspace
Loading required package: stringr

Attaching package: ‘stringr’

The following object(s) are masked _by_ ‘.GlobalEnv’:

    str_c, str_join



 New to rDrop? Look up ?dropbox_auth() for setting up an app. Use suppressPackageStartupMessages() to suppress this message in future

> dropbox_credentials <- dropbox_auth()
Error: Unauthorized
> traceback()
7: stop(err)
6: stop.if.HTTP.error(http.header)
5: getURLContent(uri, .opts = .opts, .encoding = .encoding, binary = binary, 
       curl = curl)
4: getForm(url, .params = params, curl = curl, .opts = .opts, binary = binary) at ROauth.R#274
3: op(requestURL, cred@consumerKey, cred@consumerSecret, NULL, NULL, 
       signMethod = signMethod, curl = curl, handshakeComplete = FALSE, 
       ..., binary = FALSE) at ROauth.R#63
2: handshake(dropbox_oa, post = FALSE, verify = paste("Use the Web browser to grant permission to this code", 
       "to access Dropbox on your behalf.\nWhen you see 'Success!', hit enter in R", 
       sep = "\n")) at dropbox_auth.r#48
1: dropbox_auth()
> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants