-
Notifications
You must be signed in to change notification settings - Fork 24
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
running BoxR from command line - Error in cont$type : $ operator is invalid for atomic vectors #46
Comments
Hmm. Thanks for the detailed report, though unfortunately I can't reproduce. My hunch is that authentication is failing for you. Please try:
Brendan |
Should I download this again and try? |
Yes, please update to the latest version. The problem may be that you are not running an 'interactive session' (you're using Rscript), and |
Brendan, I thought this might fix it – and I have tried this a few ways, still says it needs a listener? require(boxr) BOX_CLIENT_ID = “po1imyvnod3i…." regards, From: Brendan Rocks <notifications@github.commailto:notifications@github.com> Yes, please update to the latest version. The problem may be that you are not running an 'interactive session' (you're using Rscript), and box_auth assumes that you are. The appropriate setting in this case would be box_auth(interactive = FALSE). Let me know what you see when you try that. — CONFIDENTIALITY STATEMENT: This email message, together with all attachments, is intended only for the individual or entity to which it is addressed and may contain legally privileged or confidential information. Any dissemination, distribution or copying of this communication by persons or entities other than the intended recipient, is strictly prohibited, and may be unlawful. If you have received this communication in error please contact the sender immediately and delete the transmitted material and all copies from your system, or if received in hard copy format, return the material to us via the United States Postal Service. Thank you. |
Let me know if this works:
Rationale: Under the hood, OAuth2.0 (the standard which box.com uses to authenticate your account) requires that you have something called a 'token', which is a file sent from box.com stored on your machine. To get this, you need to submit your If you're not in an interactive session (e.g. using Rscript) then R/ Let me know if this solves your problem. I should investigate more informative error messages for this case. |
Brendan, I ran the script from Rstudio, and it ran fine. However, when I run it again from command line with box_auth(interactive=FALSE) I still get the same error:
[cid:AD58BD95-021C-4D28-B966-5CEDFEE13650] From: Brendan Rocks <notifications@github.commailto:notifications@github.com> Let me know if this works:
Rationale: Under the hood, OAuth2.0 (the standard which box.com uses to authenticate your account) requires that you have something called a 'token', which is a file sent from box.com stored on your machine. To get this, you need to submit your client_id and client_secret and then sign in via a web-browser. A token file is then stored (by default) at ~/.boxr-oauth. If you're not in an interactive session (e.g. using Rscript) then R/httpuv cannot launch a browser, which means you cannot generate a token. However, by running an interactive session first, the token should be generated on your machine. This means that a non-interactive session can find and 'refresh' the token, without the necessity for the browser validation part. Let me know if this solves your problem. I should investigate more informative error messages for this case. — CONFIDENTIALITY STATEMENT: This email message, together with all attachments, is intended only for the individual or entity to which it is addressed and may contain legally privileged or confidential information. Any dissemination, distribution or copying of this communication by persons or entities other than the intended recipient, is strictly prohibited, and may be unlawful. If you have received this communication in error please contact the sender immediately and delete the transmitted material and all copies from your system, or if received in hard copy format, return the material to us via the United States Postal Service. Thank you. |
That's not the same error. The text appears to show you authenticating successfully, and the output of R code running, no..? |
I have reduced the code now to just two lines to show the issue (it runs fine from interactive window). require(boxr) -----> See vignette('boxr') for a short guide on connecting your box.com account to R. NULL require(boxr) See vignette('boxr') for a short guide on connecting your box.com account to R. Execution haltedrequire(boxr) Loading required package: boxr See vignette('boxr') for a short guide on connecting your box.com account to R. |
Hey Austin, Assuming you got this working in the end. Closing this issue for the time being. |
I am running the following code from command line (works fine in interactive session),
require(boxr)
box_auth()
box_setwd("3862567703")
here is my session info
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sqldf_0.4-10 gsubfn_0.6-6 proto_0.3-10 RSQLite_1.0.0
[5] DBI_0.3.1 RODBC_1.3-12 boxr_0.3.1 RCurl_1.95-4.7
[9] bitops_1.0-6 XLConnect_0.2-11 XLConnectJars_0.2-9
loaded via a namespace (and not attached):
[1] assertthat_0.1 bit_1.1-12 bit64_0.9-5 chron_2.3-47
[5] curl_0.9.3 digest_0.6.8 grid_3.1.3 httr_1.0.0
[9] jsonlite_0.9.17 lattice_0.20-33 lubridate_1.3.3 magrittr_1.5
[13] memoise_0.2.1 plyr_1.8.3 R6_2.1.1 rCharts_0.4.5
[17] Rcpp_0.12.0 RGoogleAnalytics_0.1.1 rJava_0.9-7 RJSONIO_1.3-0
[21] rstudioapi_0.3.1 stringi_0.5-5 stringr_1.0.0 tcltk_3.1.3
[25] tools_3.1.3 whisker_0.3-2 yaml_2.1.13
The text was updated successfully, but these errors were encountered: