tomoh1r / ansible-vault

This project aim to R/W an ansible-vault yaml file
GNU General Public License v3.0
54 stars 32 forks source link

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

Open sharvesh06 opened 4 years ago

sharvesh06 commented 4 years ago

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

obarkhatova commented 4 years ago

Root cause is described in the previous issue https://github.com/tomoh1r/ansible-vault/issues/32