Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: _encrypt() got multiple values for argument 'recipients' #277

Open
devorbit opened this issue Aug 10, 2020 · 1 comment
Open

Comments

@devorbit
Copy link

Hi All!
I am getting one error where I am trying to do encrypt a file with the following command but its showing error even though I am passing argument recipient one time. Please help me on the same.
rkey: str = 'test_key_id'

with open('my-unencrypted.txt', 'rb') as f:
status = gpg.encrypt(
data=f,
recipients=rkey,
always_trust=True,
output='encrypted.txt.gpg')

For rkey I also tried
rkey = str(imported_keys.fingerprints[0])

but nothing is working and I am getting error like
status = gpg.encrypt(
File "<base_path>\venv\lib\site-packages\gnupg\gnupg.py", line 1064, in encrypt
result = self._encrypt(stream, recipients, **kwargs)
TypeError: _encrypt() got multiple values for argument 'recipients'

@kiorq
Copy link

kiorq commented Apr 21, 2021

I believe recipients is supposed to be a list or tuple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants