chrissimpkins / crypto

Simple symmetric GPG file encryption and decryption
http://chrissimpkins.github.io/crypto
MIT License
48 stars 27 forks source link

Encryption failed. Error: [can't concat str to bytes] #21

Open rafadiniz opened 5 years ago

rafadiniz commented 5 years ago

Please, I'm new in Python, and when I try to encrypt a file, the program shows me this message:

There was a problem with the execution of gpg. Encryption failed. Error: [can't concat str to bytes]

Can someone help me?

__ Windows 10 Python 3.7.3 crypto 1.4.1 gpg (GnuPG) 2.2.16 libgcrypt 1.8.4

chrissimpkins commented 5 years ago

Are you able to post a full trace here? We will need to understand what line that error originated on to troubleshoot it.

rafadiniz commented 5 years ago

would it be this?

image

chrissimpkins commented 5 years ago

It looks like this is coming from this block of code:

https://github.com/chrissimpkins/crypto/blob/6b95fa81b26312e46f02557dca0b5f5c898a76fd/lib/crypto/library/cryptor.py#L62-L81

I am guessing that this may be the input file path is coming in from the command line arguments as a byte string and we are trying to concatenate it to a Python string.

Seems to be a bug. I appreciate the report! This will require a bit more investigation on my end.