Skip to content

Keyring has to be installed for yagmail.register() #236

Open
@daroodar

Description

@daroodar

As per the title, keyring has to be installed separately for yagmail.register() to work.

~/ python3 -m pip install yagmail
Successfully installed yagmail-0.15.277

~/ python3
>>> import yagmail
>>> yagmail.register('foo', 'bar')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/lib/python3.9/site-packages/yagmail/password.py", line 37, in register
    keyring.set_password("yagmail", username, password)
NameError: name 'keyring' is not defined

The error goes away when you install keyring.

~/ python3 -m pip install keyring
Successfully installed keyring-23.5.0

~/ python3
>>> import yagmail
>>> yagmail.register('foo', 'bar')
>>>

keyring can be installed as a dependency when installing yagmail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions