OctoPrint-EmailNotifier
OctoPrint-EmailNotifier copied to clipboard
Can't store password
Latest OctoPi installed and fully updated.
Traceback (most recent call last):
File "
(oprint)pi@octopi:~/oprint/bin $ pip install keyrings.alt Requirement already satisfied (use --upgrade to upgrade): keyrings.alt in /home/pi/oprint/lib/python2.7/site-packages
keyrings.alt is installed, but I still can't store the password. Any ideas? Thanks!
Also get same problem
For me the same
Traceback (most recent call last):
File "
Hello, I had the same issue. I ran the command "/home/pi/oprint/bin/pip install keyring" (and not keyrings.alt) and now I can store passwords. I did not test it though.
Hope this may help.
Hi all. I realize installation and setup problems with yagmail are the source of most frustrations with this plugin. Bear with me as I try to figure out more about how it works in order to simplify the process or at least document it better.
A few points:
- yagmail is actively developed so updating to the most recent version could fix some issues. The exact command I issued on my Pi was
~/oprint/bin/pip-2.7 install yagmail[all] --upgrade
- On a related note, the system pip/python environment is different from Octoprint's
oprint/bin
pip/python environment (at least in my case). Prior to updating, I had two versions of yagmail installed on my Pi, with a fairly old one in ~/oprint). So, be careful to prefix your pip or python setup commands with the appropriate path.
(Please disregard if this is old news to you; posting here partly for my own reference.)
I have the same error. I tried to install keyring manually but it still fails. Octopi and yagmail are up to date.
yagmail.register('[email protected]', 'my_awesome_password') Traceback (most recent call last): File "
", line 1, in File "/home/pi/oprint/local/lib/python2.7/site-packages/yagmail/yagmail.py", line 435, in register keyring.set_password('yagmail', username, password) NameError: global name 'keyring' is not defined
The problems seems to be yagmail related.
This is how I got it working today. I loaded the email plugin and restarted the OctoPrint service. I have an OctoPi I loaded by hand. The path (which is the new default) to the OctoPrint python is /home/pi/OctoPrint/venv/bin. I could not get keyring to load unless I used the --no-deps flag, but the emails work so I don't care about the dependencies. So while logged in as the user pi I loaded keyring and yagmail with the following commands: ~/OctoPrint/venv/bin/pip install keyring --no-deps ~/OctoPrint/venv/bin/pip install yagmail Then I started python, imported yagmail and keyring, and then I could register my gmail address and password. Start python with the command: ~/OctoPrint/venv/bin/python Then while in python type the next three lines (note: use your gmail address and password) import yagmail import keyring yagmail.register('youraddress.gmail.com', 'yourgmailpassword') Then I typed CTL-Z to exit python and rebooted. I probably only needed to restart the OctoPrint service. Then the test email worked, yay! I hope this helps someone else, I spent 3 or 4 hours testing to figure this out.
I just got it working by manually installing the keyring
~/oprint/bin/pip install keyring
Then adding the commend "import keyring" into the python commands given in the README.md
~/oprint/bin/python
>>> import yagmail
>>> import keyring
>>> yagmail.register("SMTP username", "SMTP password")
p.s. I didn't update the yagmail or anything just stock from the octopi image on the RPI3
I followed the instructions from rcooklo and it works now.