Running ansible-vault gives a TypeError: can only join an iterable

On Mac OSX 10.10.3, after having installed from source I get:

me:$ ansible-vault create a.yml

Traceback (most recent call last):

File “/Users/paul/src/ansible/bin/ansible-vault”, line 66, in

sys.exit(cli.run())

File “/Users/paul/src/ansible/lib/ansible/cli/vault.py”, line 79, in run

self.execute()

File “/Users/paul/src/ansible/lib/ansible/cli/init.py”, line 96, in execute

fn()

File “/Users/paul/src/ansible/lib/ansible/cli/vault.py”, line 85, in execute_create

this_editor.create_file()

File “/Users/paul/src/ansible/lib/ansible/parsing/vault/init.py”, line 249, in create_file

self._edit_file_helper(cipher=self.cipher_name)

File “/Users/paul/src/ansible/lib/ansible/parsing/vault/init.py”, line 230, in _edit_file_helper

enc_data = this_vault.encrypt(tmpdata)

File “/Users/paul/src/ansible/lib/ansible/parsing/vault/init.py”, line 126, in encrypt

enc_data = this_cipher.encrypt(data, self.password)

File “/Users/paul/src/ansible/lib/ansible/parsing/vault/init.py”, line 535, in encrypt

key1, key2, iv = self.gen_key_initctr(password, salt)

File “/Users/paul/src/ansible/lib/ansible/parsing/vault/init.py”, line 523, in gen_key_initctr

count=10000, prf=pbkdf2_prf)

File “/Library/Python/2.7/site-packages/Crypto/Protocol/KDF.py”, line 110, in PBKDF2

password = tobytes(password)

File “/Library/Python/2.7/site-packages/Crypto/Util/py3compat.py”, line 85, in tobytes

return ‘’.join(s)

TypeError: can only join an iterable

What can I do to attempt to fix my install so ansible-vault works as described in the docs?

Thanks

Paul

i cannot reproduce this with stable nor current devel.

I wiped my source install and installed via

pip install ansible

and the problem is fixed. Not sure how things got out of whack. Thanks for taking a look.