GPG crashing when run from application

I have inherited an application which among other things encrypts a file using GnuPG. I made a few updates to the application and now it fails trying to encrypt the file.

The application is running on windows and has GnuPG 1.4.2.2. When I run the command from the command line, it works. When the application runs, however, I get the following error. I am not sure how to decipher the error message. Any help would be appreciated.

gpg: keyblock resource C:/Program Files/GNU/GnuPG" --output D:/WEA/ACH/milw472b.gpg --yes --batch --armor --recipient JPMC_ECS_PROD_2015 --default-key wea@weatrust.com --passphrase-fd 0 --no-verbose --sign --encrypt D:/WEA/ACH/ACH \secring.gpg': file open error gpg: keyblock resource C:/Program Files/GNU/GnuPG" --output D:/WEA/ACH/milw472b.gpg --yes --batch --armor --recipient JPMC_ECS_PROD_2015 --default-key wea@weatrust.com --passphrase-fd 0 --no-verbose --sign --encrypt D:/WEA/ACH/ACH \pubring.gpg’: file open error
gpg: no valid OpenPGP data found.
gpg: processing message failed: eof