Exception printed by python-gnupg

32 views
Skip to first unread message

Louis Becker

unread,
Jun 10, 2011, 5:45:03 AM6/10/11
to python...@googlegroups.com
Hi Vinay

I use GPG4WIN to manage the certificates on my computer. I then use
python to decrypt some files. When I decrypt a file, the decryption
works fine, but the text below gets printed to the stderr output. I have
tried to catch the exception, but it does not reach my script. To me it
seems to be a bug in the code, or am i doing something wrong? I first
used python-gnupg-0.2.5 and then upgraded to version python-gnupg-0.2.7
hoping it will go away, but it still remains along. I use python3.1.

My code:
with open(file,'rb') as stream:
dec = gpg.decrypt_file(stream,passphrase='xyz',always_trust=True)

Regards
Louis

Exception in thread Thread-16:
Traceback (most recent call last):
File "C:\python25\lib\threading.py", line 460, in __bootstrap
self.run()
File "C:\python25\lib\threading.py", line 440, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\python25\lib\site-packages\gnupg.py", line 220, in
_read_response
result.handle_status(keyword, value)
File "C:\python25\lib\site-packages\gnupg.py", line 850, in handle_status
Verify.handle_status(self, key, value)
File "C:\python25\lib\site-packages\gnupg.py", line 681, in handle_status
raise ValueError("Unknown status message: %r" % key)
ValueError: Unknown status message: 'KEY_NOT_CREATED'

Vinay Sajip

unread,
Jun 13, 2011, 4:26:29 PM6/13/11
to python-gnupg
On Jun 10, 10:45 am, Louis Becker <louis.h.bec...@gmail.com> wrote:

> ValueError: Unknown status message: 'KEY_NOT_CREATED'

What version of GnuPG were/are you using?

Regards,

Vinay Sajip

Louis Becker

unread,
Jun 14, 2011, 10:53:04 AM6/14/11
to python...@googlegroups.com
Using version 2.0.12
Reply all
Reply to author
Forward
0 new messages