huggingface / knockknock

🚪✊Knock Knock: Get notified when your training ends with only two additional lines of code
MIT License
2.78k stars 233 forks source link

keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends #71

Open lashmore opened 3 years ago

lashmore commented 3 years ago

Execution:

knockknock email --recipient-emails personal_email@gmail.com --sender-email personal_email@gmail.com sleep 10

Full error message:

Traceback (most recent call last):
  File "/home/jovyan/conda/dsEnv/bin/knockknock", line 10, in <module>
    sys.exit(main())
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/knockknock/__main__.py", line 207, in main
    sender_func(**args)(run_func)()
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/knockknock/email_sender.py", line 53, in wrapper_sender
    yag_sender.send(current_recipient, 'Training has started 🎬', contents)
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/yagmail/sender.py", line 153, in send
    self.login()
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/yagmail/sender.py", line 206, in login
    self._login(self.credentials)
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/yagmail/sender.py", line 224, in _login
    password = self.handle_password(self.user, password)
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/yagmail/sender.py", line 230, in handle_password
    return handle_password(user, password)
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/yagmail/password.py", line 11, in handle_password
    password = keyring.get_password("yagmail", user)
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/keyring/core.py", line 55, in get_password
    return get_keyring().get_password(service_name, username)
  File "/home/jovyan/conda/dsEnv/lib/python3.8/site-packages/keyring/backends/fail.py", line 25, in get_password
    raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, i
nstall the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for d
etails.

I didn't find https://pypi.org/project/keyring helpful. Installing dbus-python didn't change the behavior and it's unclear which username and password keyrings is looking for. Are we talking email credentials username and password? What if you wanted to use a different knockknock service like Slack, would the keyrings username and password credentials specified need to be different?

zanussbaum commented 3 years ago

+1 on this issue