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

keyring for Rasberry Pi? #47

Open
rogerjbos opened this issue Aug 11, 2016 · 6 comments
Open

keyring for Rasberry Pi? #47

rogerjbos opened this issue Aug 11, 2016 · 6 comments

Comments

@rogerjbos
Copy link

Does the keyring feature work on a rasberry pi? I have tried it on two of them and get the same error about no backend. How do I install a backend? pip import keyring shows keyring is installed. yagmail works great if I put the password in the script, but if I try to use yagmail.register or yagmail.SMTP() without a password I get the following error:

File "yag.py", line 2, in
yagmail.SMTP('rjbos2@gmail.com')
File "/usr/local/lib/python2.7/dist-packages/yagmail/yagmail.py", line 63, in init
self.login(password)
File "/usr/local/lib/python2.7/dist-packages/yagmail/yagmail.py", line 173, in login
password = self._handle_password(password)
File "/usr/local/lib/python2.7/dist-packages/yagmail/yagmail.py", line 137, in _handle_password
password = keyring.get_password('yagmail', self.user)
File "/usr/local/lib/python2.7/dist-packages/keyring/core.py", line 42, in get_password
return _keyring_backend.get_password(service_name, username)
File "/usr/local/lib/python2.7/dist-packages/keyring/backends/fail.py", line 18, in get_password
raise RuntimeError("No recommended backend was available. Install the "
RuntimeError: No recommended backend was available. Install the keyrings.alt package if you want to use the non-recommended backends. See README.rst for details.

@A-Shleifman
Copy link

If you install keyrings.alt it will fix the problem, but it requires to enter a "master" key manually, so I don't know how to use keyrings.alt in a python script without revealing the "master" key.

sudo pip install keyrings.alt
sudo pip3 install keyrings.alt

@ManuGithubSteam
Copy link

keyrings. alt does not work anymore.

Any other solutions ?
Thanks!

@kootenpv
Copy link
Owner

kootenpv commented Aug 2, 2017

@ManuGithubSteam I've started using OAuth2 recently, you can read about it in the readme :)

@ManuGithubSteam
Copy link

Hi
I did also use OAuth2 and made a credestial for it. When i try so send a testmail from octoprint it says:

Sending failed. Reason:: global name 'keyring' is not defined

So it want a keyring but the keyring.alt package does not exist for raspi anymore....

Any ideas ?

Thanks

@maxiedaniels
Copy link

Anyone figure this out??

@ManuGithubSteam
Copy link

Hi

I figured it out. I had to change some config line in the yagmail config i believe. But i dont remeber it. It is here in Github somewhere related to this project or octoprint.

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

5 participants