I have gnu4win installed on my widnows my python scripts looks like this
import gnupg
from pprint import pprint
gpg = gnupg.GPG(binary='G:\Pearsonhighered_python_books\python-gpg', homedir=r'G:\Pearsonhighered_python_books\python-gpg', ignore_homedir_permissions='True', verbose=True)
public_keys = gpg.list_keys(False)
print("public_keys")
pprint(public_keys)
the error I get in idle is
>>> ================================ RESTART ================================
>>>
Traceback (most recent call last):
File "G:\Pearsonhighered_python_books\python-gpg\list-keys1.py", line 10, in <module>
gpg = gnupg.GPG(binary='G:\Pearsonhighered_python_books\python-gpg', homedir=r'G:\Pearsonhighered_python_books\python-gpg', ignore_homedir_permissions='True', verbose=True)
File "C:\Python34\lib\site-packages\gnupg\gnupg.py", line 162, in __init__
self.create_trustdb()
File "C:\Python34\lib\site-packages\gnupg\gnupg.py", line 172, in create_trustdb
if self.is_gpg2():
File "C:\Python34\lib\site-packages\gnupg\gnupg.py", line 212, in is_gpg2
return _util._is_gpg2(self.binary_version)
File "C:\Python34\lib\site-packages\gnupg\_util.py", line 529, in _is_gpg2
(major, minor, micro) = _match_version_string(version)
File "C:\Python34\lib\site-packages\gnupg\_util.py", line 607, in _match_version_string
major, minor, micro = int(g[0]), int(g[2]), int(g[4])
TypeError: int() argument must be a string or a number, not 'NoneType'
I did a googel search and found this
https://github.com/isislovecruft/python-gnupg/issues/44How do I get this to work on windows? it work fine on ubuntu.