GPG sometimes can't find keys.

I’m trying to get gpg working with enigmail and thunderbird. After a bit of debugging it appears that when enigmail issues gpg commands gpg is failing to find the key file. I was able to duplicate the problem on the command line.

The command:

gpg --list-keys

returns my list of keys as expected. However the command:

gpg --list-keys --charset utf-8

Gives the error:

gpg: error reading key: public key not found

This is one of two options that enigmail uses that seems to cause problems, the other is “–status-fd 2”.

Any suggestions?