# ansible.vault not working anymore?

**URL:** <https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328>\
**Category:** Ansible Project\
**Created:** [August 14, 2018, 1:35pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328 "2018-08-14T13:35:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vid.jelen1](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vid.jelen1](https://forum.ansible.com/u/vid.jelen1)\
**Post date:** [August 14, 2018, 1:35pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/1 "2018-08-14T13:35:25Z")

</div>

Had a functional ansible-vault setup up until today.

With each run now I get the following:

ERROR! Unexpected Exception, this is probably a bug: from\_buffer() cannot return the address of the raw string within a str or unicode or bytearray object

This is a known bug and I have tried reinstalling the cryptography library through pip, but it did not solve the problem.

Anyone knows of other solutions or are there any fixes planned for this?

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [August 14, 2018, 3:55pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/2 "2018-08-14T15:55:47Z")

</div>

Without going into details - what changed on your system today?  
Because logic dictates that ansible-vault (or any other tool, for that  
matter) doesn't stop working if nothing changed.

Dick

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [August 14, 2018, 4:01pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/3 "2018-08-14T16:01:09Z")

</div>

Having just looked into this issue as it related to paramiko, the problem is with having an outdated version of python cryptography installed.

---

<div class="post-metadata">

**Author:** ![vid.jelen1](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vid.jelen1](https://forum.ansible.com/u/vid.jelen1)\
**Post date:** [August 14, 2018, 4:23pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/4 "2018-08-14T16:23:27Z")

</div>

My current python cryptography version is 2.3 & I’ve also upgraded pip itself via pip to 18.0

Ansible version is 2.7.0

I have tried reinstalling python cryptography several times with no different results than the same error message.  
The paramiko package also crossed my mind, so I updated that one as well. The issue still persists…

The only thing that changed today was a package update with apt-get update && upgrade (running Linux Mint)

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [August 14, 2018, 5:09pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/5 "2018-08-14T17:09:04Z")

</div>

Hmm, that sounds like a somewhat volatile environment.  
In any case, if somethings "suddenly" stops working, I would suggest  
to find out what exactly changed that caused it to stop working.  
Carpet-upgrading involved libraries might fix the issue, but it's not  
going to make fault finding easier.  
What about reverting the package that came in through apt-get  
(interested to know which one)?

Dick

---

<div class="post-metadata">

**Author:** ![vid.jelen1](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vid.jelen1](https://forum.ansible.com/u/vid.jelen1)\
**Post date:** [August 14, 2018, 6:39pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/6 "2018-08-14T18:39:19Z")

</div>

I think the upgrade brought in at least 25 updated packages, so it might be a bit messy to revert each & every one 😕

But I’ll have a go at it and see what I can find from there.

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [August 15, 2018, 2:57pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/7 "2018-08-15T14:57:44Z")

</div>

The current stable ansible version is 2.6.2 according to the github release page [https://github.com/ansible/ansible/releases](https://github.com/ansible/ansible/releases)

How did you get Ansible version 2.7.0? is the from the devel branch?

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [August 15, 2018, 2:59pm UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/8 "2018-08-15T14:59:28Z")

</div>

I would say a faster way is probably to setup a python virtualenv and see if you can reproduce the issue in the new clean virtual env.  
You can find instructions how to setup a python virutal env at [https://docs.python-guide.org/dev/virtualenvs/](https://docs.python-guide.org/dev/virtualenvs/)

---

<div class="post-metadata">

**Author:** ![vid.jelen1](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vid.jelen1](https://forum.ansible.com/u/vid.jelen1)\
**Post date:** [August 21, 2018, 7:53am UTC](https://forum.ansible.com/t/ansible-vault-not-working-anymore/28328/9 "2018-08-21T07:53:58Z")

</div>

Tried the python virtualenv and downgrading/upgrading all the possible packages with no success.

But I finally resolved the issue after mingling with the system packages…

I’m running python 2.7.12 and the issue for me was, that the libs **python3-crypto** & **python3-cffi-backend** were installed through the system package manager.

Uninstalling those immediately solved the problem 🙂
