Skip to content

Unable to set credentials, 'No such file or directory' #204

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

Closed
arnoud999 opened this issue Apr 15, 2015 · 7 comments
Closed

Unable to set credentials, 'No such file or directory' #204

arnoud999 opened this issue Apr 15, 2015 · 7 comments

Comments

@arnoud999
Copy link

When I try to set my credentials/API key, I get the following error message:

[1] "Your credentials file:"
Error in if (file.info(CREDENTIALS_FILE)$size) { : 
  argument is not interpretable as logical
In addition: Warning message:
In file.create(abspath) :
  cannot create file '//studfiles.campus.uvt.nl/files/home/home09/u1236118/.plotly/.credentials', reason 'No such file or directory'

I've tried creating the .plotly folder and the .credentials file myself, and I tried running R through a command window as administrator, but in both cases I still saw the same error message.

@theengineear
Copy link

@arnoud999 , are you on a personal computer? The credentials file tries to get created in ~/.plotly/. That error seems to be saying ~/.plotly doesn't exist. As a test, can you open up a terminal and do the following?

cd ~/.plotly

You've probably got a permissions problem, but I'm sure we can figure out a way to get you up and running.

The simplest thing to get going straight-away is to just sign in.

py <- plotly("your_username", "your_api_key")

In general, this isn't a great solution as you'll be hard-coding your credentials and you'd have to do it for every script.

@arnoud999
Copy link
Author

Thanks for your quick response!

cd ~/.plotly (or cd ~\.plotly) doesn't work, probably because I'm running Windows?

py <- plotly("your_username", "your_api_key") gives me the same error as above.

It indeed seems to be a permission problem, I'm on a work computer and my user folder is some kind of network drive. Is it possible to change the location of .plotly?

@theengineear
Copy link

@arnoud999 , specifying the location of the .plotly folder could be nice, I think that would be pretty easy through an environment variable. We won't have this solution for you immediately, but I could definitely see the utility in this, so I'll see what I can do.

Until then, yes, you'll need to sort out the permission block. I had thought that our R library handled this though, @mkcor , thoughts?

@mkcor
Copy link
Contributor

mkcor commented Apr 16, 2015

@theengineear You are right, I remember troubleshooting Windows users in the past... But this may be yet another thing... It could be a thing to let users specify/overwrite environment variable PLOTLY_DIR...

I think Windows does not understand ~ (which is why our R code needs the path.expand("~") by the way). @arnoud999 It looks like your 'home' is not quite the home the way we usually assume -- you are on a workstation, I understand.

Can you try and run, say:

py <- plotly("rAPI", "yu680v5eii")

Please?

@arnoud999
Copy link
Author

Unfortunately, I get the same error:

> py <- plotly("rAPI", "yu680v5eii")
Error in if (file.info(CONFIG_FILE)$size) { : 
  argument is not interpretable as logical
In addition: Warning message:
In file.create(abspath) :
  cannot create file '//studfiles.campus.uvt.nl/files/home/home09/u1236118/.plotly/.config', reason 'No such file or directory'

@mkcor
Copy link
Contributor

mkcor commented Apr 17, 2015

@arnoud999 It's not the same error! The CREDENTIALS info is in but you are missing the CONFIG info, so please try this workaround:

py <- plotly(username="rAPI", key="yu680v5eii", base_url="https://plot.ly")

Let me know how it goes!

@arnoud999
Copy link
Author

That works, thanks a lot! 👍

@cpsievert cpsievert mentioned this issue May 7, 2015
@mkcor mkcor closed this as completed May 8, 2015
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

3 participants