We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I run data = vault.load(open(test).read()) where test = "/path/to/vault.yml" I get this
data = vault.load(open(test).read())
test = "/path/to/vault.yml"
--------------------------------------------------------------------------- AnsibleError Traceback (most recent call last) <ipython-input-104-4b5e48176f32> in <module>() 2 password = get_ansible_password() 3 vault = ansible_vault.Vault(password) ----> 4 data = vault.load(open(test).read()) ~/.pyenv/versions/3.5.1/lib/python3.5/site-packages/ansible_vault/api.py in load(self, stream) 48 def load_raw(self, stream): 49 """Read vault stream and return raw data.""" ---> 50 return self.vault.decrypt(stream) 51 52 def dump_raw(self, text, stream=None): ~/.pyenv/versions/3.5.1/lib/python3.5/site-packages/ansible/parsing/vault/__init__.py in decrypt(self, vaulttext, filename) 249 try: 250 return unhexlify(b_data) --> 251 except (BinasciiError, TypeError) as exc: 252 raise AnsibleVaultFormatError('Vault format unhexlify error: %s' % exc) 253 AnsibleError: Decryption failed
I tested with variable test in Unicode string and byte string format. They both returned the same error.
test
Unicode string
byte string
The text was updated successfully, but these errors were encountered:
I have the same problem :( could it be a trailing \n in the password file?
\n
Sorry, something went wrong.
Ran into this as well, and yes, the trailing \n is the issue.
tomoh1r
No branches or pull requests
When I run
data = vault.load(open(test).read())
wheretest = "/path/to/vault.yml"
I get this
I tested with variable
test
inUnicode string
andbyte string
format. They both returned the same error.The text was updated successfully, but these errors were encountered: