tomoh1r/ansible-vault

I get this error when I try to decrypt a file using this package

sharvesh06 opened this issue · 1 comments

File "test.py", line 4, in
data = vault.load(open('vars.yml').read())
File "/usr/local/lib/python3.8/dist-packages/ansible_vault/api.py", line 62, in load
return yaml.safe_load(self.load_raw(stream))
File "/usr/local/lib/python3.8/dist-packages/ansible_vault/api.py", line 50, in load_raw
return self.vault.decrypt(stream)
File "/usr/local/lib/python3.8/dist-packages/ansible/parsing/vault/init.py", line 663, in decrypt
plaintext, vault_id, vault_secret = self.decrypt_and_get_vault_id(vaulttext, filename=filename)
File "/usr/local/lib/python3.8/dist-packages/ansible/parsing/vault/init.py", line 720, in decrypt_and_get_vault_id
_matches = match_secrets(self.secrets, vault_id_matchers)
File "/usr/local/lib/python3.8/dist-packages/ansible/parsing/vault/init.py", line 542, in match_secrets
matches = [(vault_id, secret) for vault_id, secret in secrets if vault_id in target_vault_ids]
File "/usr/local/lib/python3.8/dist-packages/ansible/parsing/vault/init.py", line 542, in
matches = [(vault_id, secret) for vault_id, secret in secrets if vault_id in target_vault_ids]
TypeError: cannot unpack non-iterable int object

Root cause is described in the previous issue #32