knockknock icon indicating copy to clipboard operation
knockknock copied to clipboard

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

Open lashmore opened this issue 3 years ago • 1 comments

Execution:

knockknock email --recipient-emails [email protected] --sender-email [email protected] 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?

lashmore avatar Sep 07 '21 17:09 lashmore

+1 on this issue

zanussbaum avatar Oct 08 '21 13:10 zanussbaum