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

93 views
Skip to first unread message

Paul DeBruicker

unread,
Jun 9, 2015, 9:17:18 PM6/9/15
to ansible...@googlegroups.com



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 <module>

    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

Brian Coca

unread,
Jun 9, 2015, 9:34:04 PM6/9/15
to ansible...@googlegroups.com
i cannot reproduce this with stable nor current devel.


--
Brian Coca

Paul DeBruicker

unread,
Jun 10, 2015, 5:45:10 PM6/10/15
to ansible...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages