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

Unable to read credentials #9

Open
rushirene opened this issue Nov 21, 2016 · 6 comments
Open

Unable to read credentials #9

rushirene opened this issue Nov 21, 2016 · 6 comments

Comments

@rushirene
Copy link

Each time I try to open twphotos on the terminal I get the following message:

Traceback (most recent call last):
File "/usr/local/bin/twphotos", line 7, in
from twphotos.photos import main
File "/usr/local/lib/python2.7/dist-packages/twphotos/photos.py", line 9, in
from .settings import (CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN,
File "/usr/local/lib/python2.7/dist-packages/twphotos/settings.py", line 44, in
raise Exception('No credentials found.')
Exception: No credentials found.

I've already put the "credentials.ini"/"credentials.cfg" files inside the /twphotos folder and I still get the same error.

Am I doing something wrong?

@shichao-an
Copy link
Owner

You don't need to create a directory. The config file itself is ~/.twphotos. For example:

$ cat ~/.twphotos
[credentials]
consumer_key = your_consumer_key
consumer_secret = your_consumer_secret
access_token_key = your_access_token_key
access_token_secret = your_access_token_secret

@rushirene
Copy link
Author

Tried again, but the terminal tells me that there's not file or directory with that name.
Btw, the program is installed in the root folder since I have full-disk encryption. Maybe it has something to do with it?

@Honowski
Copy link

Where is the .twphotos file located? It appears to be a hidden file but when i edit it to my consumer_keys I still get the same error as above.

@rushirene
Copy link
Author

Well, tried everything. I downloaded VirtualBox to install the program in an unencrypted disk. Installed through pip, then tried the distribution and still nothing.
There wasn't a .twphotos config file (like the test one in the distribution), so I moved the test file with the correct credentials into the unencrypted "twphotos" folder and it still didn't read the file.

I don't know what I'm doing wrong.

@ajinkyakolhe
Copy link

I am facing exactly the same problem and would like to know the folder where this file is to be placed.

@shichao-an
Copy link
Owner

@ajinkyakolhe the folder is your home folder. On Unix systems, it's identified by $HOME or ~ (tilde expansion), so the full path of the config file is something like /home/yourname/.twphotos on Linux and /Users/yourname/.twphotos on OS X. Note that .twphotos is a file in your home directory. You have to run twphotos as yourself, not as other users, so that twphotos can find your config file.

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

4 participants