Flask application not finding GnuPG

I'm interfacing gpg in a flask application with python-gnupg. The module is installed in a virtualenv together with the rest of my application. When running I receive a 500 internal server error, and the exception is: