isislovecruft / python-gnupg

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

[ERROR] Error sending data: Broken pipe [ERROR]Unable to close outstream <_io.BufferedWriter name=5>: [Errno 32] Broken pipe #262

Open peter-t-kim opened 5 years ago

peter-t-kim commented 5 years ago

Hello @isislovecruft,

I switched to your library in the hopes that it would resolve this issue which I also experienced on the original python-gnupg package. I am simply calling the method like so:

encryptedString = gpg.encrypt(fileObj, recipientID)

where fileObj is a byte string (b'blah blah') and recipientID is the string containing the recipient user id which I parsed from the key's uids field. I do not see where I am going wrong or why the pipe is broken.

Please advise! Thank you very much!

kiawin commented 2 years ago

Just a note, the broken pipe is likely due to some error raised during the encryption process.

The following printing of Crypt attributes will tell us the reason behind the failure.

print(encryptedString.ok)
print(encryptedString.status)
print(encryptedString.stderr)
Hamza442 commented 1 year ago

@kiawin , I am facing broken pipe error when encrypting data is there any way to resolve this issue ?