isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

Unknown status message: 'ENCRYPTION_COMPLIANCE_MODE' #207

Closed Paradoxis closed 6 years ago

Paradoxis commented 7 years ago

Currently getting this random exception from some thread when encrypting a message.

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/luke/Documents/Projects/email-analysis/venv/lib/python3.6/site-packages/gnupg/_meta.py", line 650, in _read_response
    result._handle_status(keyword, value)
  File "/Users/luke/Documents/Projects/email-analysis/venv/lib/python3.6/site-packages/gnupg/_parsers.py", line 1757, in _handle_status
    super(Crypt, self)._handle_status(key, value)
  File "/Users/luke/Documents/Projects/email-analysis/venv/lib/python3.6/site-packages/gnupg/_parsers.py", line 1656, in _handle_status
    raise ValueError("Unknown status message: %r" % key)
ValueError: Unknown status message: 'ENCRYPTION_COMPLIANCE_MODE'

Dirty monkey patch:

import gnupg._parsers
gnupg._parsers.Verify.TRUST_LEVELS["ENCRYPTION_COMPLIANCE_MODE"] = 23

Platform: OSX 10.12.6 GPG version: 2.2.0

txtcoder commented 7 years ago

I have the same problem, did you end up finding any solutions?

Paradoxis commented 7 years ago

@txtcoder I used the monkeypatch I supplied :)

ScottABrown commented 6 years ago

Is this fix merged? I'm still hitting the error for Unknown status message: 'ENCRYPTION_COMPLIANCE_MODE' with an install of the current head of master. The monkey patch seems to fix it.

Thanks, -Scott

isislovecruft commented 6 years ago

This is fixed in #220 which will be included in the next release (3.0.3).

arty-hlr commented 5 years ago

Same error here, and the monkey patch did not solve it :/