# Ansible-vault errors with "Odd-length string"

**URL:** <https://forum.ansible.com/t/ansible-vault-errors-with-odd-length-string/17188>\
**Category:** Ansible Project\
**Created:** [January 5, 2015, 5:25pm UTC](https://forum.ansible.com/t/ansible-vault-errors-with-odd-length-string/17188 "2015-01-05T17:25:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mxx](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mxx](https://forum.ansible.com/u/Mxx)\
**Post date:** [January 5, 2015, 5:25pm UTC](https://forum.ansible.com/t/ansible-vault-errors-with-odd-length-string/17188/1 "2015-01-05T17:25:09Z")

</div>

I’m running Ansible 1.8.2  
I have a vaulted file created on another system. On that system it works without any problems.  
However, when I run it on my local system I get the follow error:

`

```auto
$» ansible-vault --debug view vars/vaulted_vars.yml
Vault password:
Traceback (most recent call last):
  File "/usr/bin/ansible-vault", line 225, in main
    fn(args, options, parser)
  File "/usr/bin/ansible-vault", line 172, in execute_view
    this_editor.view_file()
  File "/usr/lib/python2.7/site-packages/ansible/utils/vault.py", line 280, in view_file
    dec_data = this_vault.decrypt(tmpdata)
  File "/usr/lib/python2.7/site-packages/ansible/utils/vault.py", line 136, in decrypt
    data = this_cipher.decrypt(data, self.password)
  File "/usr/lib/python2.7/site-packages/ansible/utils/vault.py", line 545, in decrypt
    data = unhexlify(data)
TypeError: Odd-length string

ERROR: Odd-length string
$»

```

`

I tried to manually type in the password or copy-pasting it, but the error still happens.  
What is going on here?

---

<div class="post-metadata">

**Author:** ![Mxx](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mxx](https://forum.ansible.com/u/Mxx)\
**Post date:** [January 7, 2015, 11:01pm UTC](https://forum.ansible.com/t/ansible-vault-errors-with-odd-length-string/17188/2 "2015-01-07T23:01:50Z")

</div>

Nobody knows anything about this error? 😕

---

<div class="post-metadata">

**Author:** ![rdv717](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@rdv717](https://forum.ansible.com/u/rdv717)\
**Post date:** [September 29, 2016, 9:25pm UTC](https://forum.ansible.com/t/ansible-vault-errors-with-odd-length-string/17188/3 "2016-09-29T21:25:22Z")

</div>

Try var=binascii.unhexlify(data)
