Thanks very much for looking at this so promptly, and sorry for the incompleteness of the description.

On 2017-11-05 18:22, Elena ``of Valhalla'' wrote:
from gpg import GPG

is this a typo for ``from gnupg import GPG``?
Yes, you're right, sorry.

I've tried to reproduce it by exporting a secret key both by armouring
it and reading it as a string (``with open('somekey.asc') as fp: strKey
= fp.read()``) ...

that's right, I'm using a file containing an armoured key (readable encoded characters) and reading it into a string.

Unfortunately when I tried it again with a fresh keyring I realised that I'd made a mistake earlier, and the GPG construction wasn't what I had thought. I was actually doing this:
gpg = GPG(gnupghome="/path/to/keyring", gpgbinary="gpg")

I thought I had removed the gpgbinary parameter and demonstrated that it didn't make any difference, but I was mistaken.

In /usr/bin/ I have gpg, gpg1, and gpg2 which is a link to gpg.
If I do not specify a gpgbinary, or if I specify gpg1, then the import works. If I specify gpg or gpg2 then I get the error I reported earlier, with KEY_CONSIDERED.

I need to do some reading about gpg1 and gpg2 and presumably just take the default instead of trying to specify one (I don't yet understand the differences). I had thought that specifying the gpgbinary was necessary because on non-linux platforms it wouldn't necessarily be called "gpg".

Sorry for the confusion.

Reply via email to