When trying to initialize the GnuPG binding in Python, I\'m getting an error message
TypeError: __init__() got an unexpected keyword argument \'gnupghome\'
<
GnuPG (as command line tool) knows two ways to specify the GnuPG home directory:
Using an environment variable:
GPGHOME=C:\Users\samss\AppData\Roaming\gnupg gpg
Passing it as a parameter (which is also available as homedir
parameter in the configuration file):
gpg --homedir=C:\Users\samss\AppData\Roaming\gnupg
The GnuPG Python binding allows some parameters to be passed during initialization. Because of the initialization syntax, you probably mixed this up with the environment variable version of defining the home directory on the command line.
An additional warning: You probably want to access another system user's GnuPG home directory. GnuPG is very picky about safe permissions. For a development machine, it might be fine to use the GnuPG parameter --no-permission-warning
and privileges that allow rather broad access, but better start with a clean approach from the start and initialize a new GnuPG home directory for your application that can be properly restricted regarding permissions.