Skip to content

Conversation

@joshwenke
Copy link

@joshwenke joshwenke commented Apr 3, 2023

In newer versions of gnupg, it uses homedir instead of gnupghome > https://pythonhosted.org/gnupg/gnupg.html

When using gnupghome in the simplelogin.env I get this error when running the docker command to prepare the database by running the migration (and /sl/pgp is definitely a directory)

...... other errors above
  File "/code/app/dashboard/views/mailbox_detail.py", line 20, in <module>
    from app.pgp_utils import PGPException, load_public_key_and_check
  File "/code/app/pgp_utils.py", line 14, in <module>
    gpg = gnupg.GPG(gnupghome=GNUPGHOME)
  File "/usr/local/lib/python3.7/site-packages/gnupg.py", line 827, in __init__
    raise ValueError('gnupghome should be a directory (it isn\'t): %s' % gnupghome)
ValueError: gnupghome should be a directory (it isn't): /sl/pgp

Changing my simplelogin.env to use homedir instead, made this process work. Hope this helps.

In newer versions of gnupg, it uses `homedir` instead of `gnupghome`
When using gnupghome in the simplelogin.env I get this error when running the docker command to prepare the database by running the migration:

...... other errors above
  File "/code/app/dashboard/views/mailbox_detail.py", line 20, in <module>
    from app.pgp_utils import PGPException, load_public_key_and_check
  File "/code/app/pgp_utils.py", line 14, in <module>
    gpg = gnupg.GPG(gnupghome=GNUPGHOME)
  File "/usr/local/lib/python3.7/site-packages/gnupg.py", line 827, in __init__
    raise ValueError('gnupghome should be a directory (it isn\'t): %s' % gnupghome)
ValueError: gnupghome should be a directory (it isn't): /sl/pgp

Changing my simplelogin.env to use homedir instead, made this process work. Hope this helps.
@nguyenkims
Copy link
Contributor

@joshwenke thanks but as we pin the version of gpg as you can see on

app/poetry.lock

Line 2668 in c09b5bc

name = "python-gnupg"
, changes in newer version shouldn't affect SL.

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

Successfully merging this pull request may close these issues.

2 participants