Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
what version are you using? there was a bug that caused this but it has been fixed. Also output with - would be helfpul -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8n1jtNnmT0TUhS-xaLUfpfxDCz1r4F7450u2JKvtu6pHw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
Also, I'm on Mac OS 10.11.3 running Python 2.7.10. On Thursday, January 21, 2016 at 10:28:23 AM UTC-5, Victor Keenan wrote: > > Thanks Brian for the help! I'm using ansible 2.1.0 (devel 5e18bc5955). My > - output is... > > Unexpected Exception: integer division or modulo by zero > the full traceback was: > > > Traceback (most recent call last): > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > sys.exit(cli.run()) > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in > run > self.execute() > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in > execute > fn() > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > execute_create > self.editor.create_file(self.args[0]) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line 341, in create_file > self._edit_file_helper(filename) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line 298, in _edit_file_helper > self._shred_file(tmp_path) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line 281, in _shred_file > self._shred_file_custom(tmp_path) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line 248, in _shred_file_custom > for _ in range(0, file_len // chunk_len): > ZeroDivisionError: integer division or modulo by zero > > > On Thursday, January 21, 2016 at 10:06:40 AM UTC-5, Brian Coca wrote: >> >> what version are you using? there was a bug that caused this but it >> has been fixed. Also output with - would be helfpul >> >> >> >> >> -- >> Brian Coca >> > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5de6a6df-4f46-4909-9baf-af3fa87a99ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
Thanks Brian for the help! I'm using ansible 2.1.0 (devel 5e18bc5955). My - output is... Unexpected Exception: integer division or modulo by zero the full traceback was: Traceback (most recent call last): File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in sys.exit(cli.run()) File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in run self.execute() File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in execute fn() File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in execute_create self.editor.create_file(self.args[0]) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 341, in create_file self._edit_file_helper(filename) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 298, in _edit_file_helper self._shred_file(tmp_path) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 281, in _shred_file self._shred_file_custom(tmp_path) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 248, in _shred_file_custom for _ in range(0, file_len // chunk_len): ZeroDivisionError: integer division or modulo by zero On Thursday, January 21, 2016 at 10:06:40 AM UTC-5, Brian Coca wrote: > > what version are you using? there was a bug that caused this but it > has been fixed. Also output with - would be helfpul > > > > > -- > Brian Coca > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d48e57ba-1415-413e-93a1-f4b8b348d3e3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
fixed via http://github.com/ansible/ansible/commit/f26adcc7da7f8e6605167203249648f7b0e74fb7 On Thu, Jan 21, 2016 at 10:28 AM, Victor Keenanwrote: > Thanks Brian for the help! I'm using ansible 2.1.0 (devel 5e18bc5955). My > - output is... > > Unexpected Exception: integer division or modulo by zero > the full traceback was: > > > Traceback (most recent call last): > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > sys.exit(cli.run()) > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in run > self.execute() > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in > execute > fn() > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > execute_create > self.editor.create_file(self.args[0]) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 341, in create_file > self._edit_file_helper(filename) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 298, in _edit_file_helper > self._shred_file(tmp_path) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 281, in _shred_file > self._shred_file_custom(tmp_path) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 248, in _shred_file_custom > for _ in range(0, file_len // chunk_len): > ZeroDivisionError: integer division or modulo by zero > > > On Thursday, January 21, 2016 at 10:06:40 AM UTC-5, Brian Coca wrote: >> >> what version are you using? there was a bug that caused this but it >> has been fixed. Also output with - would be helfpul >> >> >> >> >> -- >> Brian Coca > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/d48e57ba-1415-413e-93a1-f4b8b348d3e3%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8%3D-3L8_3tzMHcCReoSwcmS0-xY%2BJ0LvL%3DDXPSWN-A79yQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
I cannot reproduce this ... but I'm on linux ... On Thu, Jan 21, 2016 at 11:09 AM, Victor Keenanwrote: > No, I'm trying to create a new file/vault. Here is what I'm entering and the > output... > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ls -an > total 0 > drwxr-xr-x 2 501 20 68 Jan 21 11:07 . > drwxr-xr-x 9 501 20 306 Jan 21 10:56 .. > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ansible-vault > create victor.yml - > No config file found; using defaults > New Vault password: > Confirm New Vault password: > ERROR! Unexpected Exception: [Errno 2] No such file or directory > the full traceback was: > > > Traceback (most recent call last): > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > sys.exit(cli.run()) > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in run > self.execute() > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in > execute > fn() > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > execute_create > self.editor.create_file(self.args[0]) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 344, in create_file > self._edit_file_helper(filename) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 298, in _edit_file_helper > call(self._editor_shell_command(tmp_path)) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 522, in call > return Popen(*popenargs, **kwargs).wait() > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 710, in __init__ > errread, errwrite) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 1335, in _execute_child > raise child_exception > OSError: [Errno 2] No such file or directory > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ > > > On Thursday, January 21, 2016 at 11:05:26 AM UTC-5, Brian Coca wrote: >> >> are you trying to edit a non existant file? >> >> On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenan >> wrote: >> > Thanks Brain! Progress, but now a different error... >> > >> > ERROR! Unexpected Exception: [Errno 2] No such file or directory >> > the full traceback was: >> > >> > >> > Traceback (most recent call last): >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >> > sys.exit(cli.run()) >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in >> > run >> > self.execute() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, >> > in >> > execute >> > fn() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in >> > execute_create >> > self.editor.create_file(self.args[0]) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> > line >> > 344, in create_file >> > self._edit_file_helper(filename) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> > line >> > 298, in _edit_file_helper >> > call(self._editor_shell_command(tmp_path)) >> > File >> > >> > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> > line 522, in call >> > return Popen(*popenargs, **kwargs).wait() >> > File >> > >> > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> > line 710, in __init__ >> > errread, errwrite) >> > File >> > >> > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> > line 1335, in _execute_child >> > raise child_exception >> > OSError: [Errno 2] No such file or directory >> > >> > >> > On Thursday, January 21, 2016 at 10:51:57 AM UTC-5, Brian Coca wrote: >> >> >> >> fixed via >> >> >> >> http://github.com/ansible/ansible/commit/f26adcc7da7f8e6605167203249648f7b0e74fb7 >> >> >> >> On Thu, Jan 21, 2016 at 10:28 AM, Victor Keenan >> >> wrote: >> >> > Thanks Brian for the help! I'm using ansible 2.1.0 (devel >> >> > 5e18bc5955). >> >> > My >> >> > - output is... >> >> > >> >> > Unexpected Exception: integer division or modulo by zero >> >> > the full traceback was: >> >> > >> >> > >> >> > Traceback (most recent call last): >> >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >> >> > >> >> > sys.exit(cli.run()) >> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, >> >> > in >> >> > run >> >> > self.execute() >> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line >> >> > 99, >> >> > in >> >> > execute >> >> > fn() >> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, >> >> > in >> >> > execute_create >> >> > self.editor.create_file(self.args[0]) >> >> > File >> >> >
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
It works on Ubuntu for me too. Just not on Mac OS X. On Thursday, January 21, 2016 at 11:40:49 AM UTC-5, Brian Coca wrote: > > I cannot reproduce this ... but I'm on linux ... > > On Thu, Jan 21, 2016 at 11:09 AM, Victor Keenan> wrote: > > No, I'm trying to create a new file/vault. Here is what I'm entering and > the > > output... > > > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ls -an > > total 0 > > drwxr-xr-x 2 501 20 68 Jan 21 11:07 . > > drwxr-xr-x 9 501 20 306 Jan 21 10:56 .. > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ > ansible-vault > > create victor.yml - > > No config file found; using defaults > > New Vault password: > > Confirm New Vault password: > > ERROR! Unexpected Exception: [Errno 2] No such file or directory > > the full traceback was: > > > > > > Traceback (most recent call last): > > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > > sys.exit(cli.run()) > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in > run > > self.execute() > > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, > in > > execute > > fn() > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > > execute_create > > self.editor.create_file(self.args[0]) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 344, in create_file > > self._edit_file_helper(filename) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 298, in _edit_file_helper > > call(self._editor_shell_command(tmp_path)) > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 522, in call > > return Popen(*popenargs, **kwargs).wait() > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 710, in __init__ > > errread, errwrite) > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 1335, in _execute_child > > raise child_exception > > OSError: [Errno 2] No such file or directory > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ > > > > > > On Thursday, January 21, 2016 at 11:05:26 AM UTC-5, Brian Coca wrote: > >> > >> are you trying to edit a non existant file? > >> > >> On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenan > >> wrote: > >> > Thanks Brain! Progress, but now a different error... > >> > > >> > ERROR! Unexpected Exception: [Errno 2] No such file or directory > >> > the full traceback was: > >> > > >> > > >> > Traceback (most recent call last): > >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > > >> > sys.exit(cli.run()) > >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, > in > >> > run > >> > self.execute() > >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line > 99, > >> > in > >> > execute > >> > fn() > >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, > in > >> > execute_create > >> > self.editor.create_file(self.args[0]) > >> > File > "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > >> > line > >> > 344, in create_file > >> > self._edit_file_helper(filename) > >> > File > "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > >> > line > >> > 298, in _edit_file_helper > >> > call(self._editor_shell_command(tmp_path)) > >> > File > >> > > >> > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > >> > line 522, in call > >> > return Popen(*popenargs, **kwargs).wait() > >> > File > >> > > >> > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > >> > line 710, in __init__ > >> > errread, errwrite) > >> > File > >> > > >> > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > >> > line 1335, in _execute_child > >> > raise child_exception > >> > OSError: [Errno 2] No such file or directory > >> > > >> > > >> > On Thursday, January 21, 2016 at 10:51:57 AM UTC-5, Brian Coca wrote: > >> >> > >> >> fixed via > >> >> > >> >> > http://github.com/ansible/ansible/commit/f26adcc7da7f8e6605167203249648f7b0e74fb7 > > >> >> > >> >> On Thu, Jan 21, 2016 at 10:28 AM, Victor Keenan > > >> >> wrote: > >> >> > Thanks Brian for the help! I'm using ansible 2.1.0 (devel > >> >> > 5e18bc5955). > >> >> > My > >> >> > - output is... > >> >> > > >> >> > Unexpected Exception: integer division or modulo by zero > >> >> > the full traceback was: > >> >> > > >> >> > > >> >> > Traceback (most recent call last): > >> >> > File
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
What contents are you putting in the vault file? I can get this to happen if I put nothing in the file. In which case the following is the cause: File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/parsing/vault/__init__.py", line 249, in _shred_file_custom for _ in range(0, file_len // chunk_len): ZeroDivisionError: integer division or modulo by zero But is this happening if you put content into the file? We should probably solve the above error regardless. Also, what EDITOR is being used on Ubuntu and Mac? Are they both vim? What versions? On Thu, Jan 21, 2016 at 10:48 AM, Victor Keenanwrote: > It works on Ubuntu for me too. Just not on Mac OS X. > > On Thursday, January 21, 2016 at 11:40:49 AM UTC-5, Brian Coca wrote: >> >> I cannot reproduce this ... but I'm on linux ... >> >> On Thu, Jan 21, 2016 at 11:09 AM, Victor Keenan >> wrote: >> > No, I'm trying to create a new file/vault. Here is what I'm entering >> and the >> > output... >> > >> > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ls -an >> > total 0 >> > drwxr-xr-x 2 501 20 68 Jan 21 11:07 . >> > drwxr-xr-x 9 501 20 306 Jan 21 10:56 .. >> > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ >> ansible-vault >> > create victor.yml - >> > No config file found; using defaults >> > New Vault password: >> > Confirm New Vault password: >> > ERROR! Unexpected Exception: [Errno 2] No such file or directory >> > the full traceback was: >> > >> > >> > Traceback (most recent call last): >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >> >> > sys.exit(cli.run()) >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in >> run >> > self.execute() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, >> in >> > execute >> > fn() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in >> > execute_create >> > self.editor.create_file(self.args[0]) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> line >> > 344, in create_file >> > self._edit_file_helper(filename) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> line >> > 298, in _edit_file_helper >> > call(self._editor_shell_command(tmp_path)) >> > File >> > >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> >> > line 522, in call >> > return Popen(*popenargs, **kwargs).wait() >> > File >> > >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> >> > line 710, in __init__ >> > errread, errwrite) >> > File >> > >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> >> > line 1335, in _execute_child >> > raise child_exception >> > OSError: [Errno 2] No such file or directory >> > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ >> > >> > >> > On Thursday, January 21, 2016 at 11:05:26 AM UTC-5, Brian Coca wrote: >> >> >> >> are you trying to edit a non existant file? >> >> >> >> On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenan >> >> wrote: >> >> > Thanks Brain! Progress, but now a different error... >> >> > >> >> > ERROR! Unexpected Exception: [Errno 2] No such file or directory >> >> > the full traceback was: >> >> > >> >> > >> >> > Traceback (most recent call last): >> >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >> >> >> > sys.exit(cli.run()) >> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, >> in >> >> > run >> >> > self.execute() >> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line >> 99, >> >> > in >> >> > execute >> >> > fn() >> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, >> in >> >> > execute_create >> >> > self.editor.create_file(self.args[0]) >> >> > File >> "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> >> > line >> >> > 344, in create_file >> >> > self._edit_file_helper(filename) >> >> > File >> "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> >> > line >> >> > 298, in _edit_file_helper >> >> > call(self._editor_shell_command(tmp_path)) >> >> > File >> >> > >> >> > >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> >> >> > line 522, in call >> >> > return Popen(*popenargs, **kwargs).wait() >> >> > File >> >> > >> >> > >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> >> >> > line 710, in __init__ >> >> > errread, errwrite) >> >> > File >> >> > >> >> > >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >> >> >> > line 1335, in _execute_child >> >> > raise child_exception >> >> > OSError: [Errno 2] No such file or directory >> >> > >> >> > >> >> > On Thursday,
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
No, I'm trying to create a new file/vault. Here is what I'm entering and the output... local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ls -an total 0 drwxr-xr-x 2 501 20 68 Jan 21 11:07 . drwxr-xr-x 9 501 20 306 Jan 21 10:56 .. local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ansible-vault create victor.yml - No config file found; using defaults New Vault password: Confirm New Vault password: ERROR! Unexpected Exception: [Errno 2] No such file or directory the full traceback was: Traceback (most recent call last): File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in sys.exit(cli.run()) File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in run self.execute() File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in execute fn() File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in execute_create self.editor.create_file(self.args[0]) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 344, in create_file self._edit_file_helper(filename) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 298, in _edit_file_helper call(self._editor_shell_command(tmp_path)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py" , line 522, in call return Popen(*popenargs, **kwargs).wait() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py" , line 710, in __init__ errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py" , line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ On Thursday, January 21, 2016 at 11:05:26 AM UTC-5, Brian Coca wrote: > > are you trying to edit a non existant file? > > On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenan> wrote: > > Thanks Brain! Progress, but now a different error... > > > > ERROR! Unexpected Exception: [Errno 2] No such file or directory > > the full traceback was: > > > > > > Traceback (most recent call last): > > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > > sys.exit(cli.run()) > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in > run > > self.execute() > > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, > in > > execute > > fn() > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > > execute_create > > self.editor.create_file(self.args[0]) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 344, in create_file > > self._edit_file_helper(filename) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 298, in _edit_file_helper > > call(self._editor_shell_command(tmp_path)) > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 522, in call > > return Popen(*popenargs, **kwargs).wait() > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 710, in __init__ > > errread, errwrite) > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 1335, in _execute_child > > raise child_exception > > OSError: [Errno 2] No such file or directory > > > > > > On Thursday, January 21, 2016 at 10:51:57 AM UTC-5, Brian Coca wrote: > >> > >> fixed via > >> > http://github.com/ansible/ansible/commit/f26adcc7da7f8e6605167203249648f7b0e74fb7 > > >> > >> On Thu, Jan 21, 2016 at 10:28 AM, Victor Keenan > >> wrote: > >> > Thanks Brian for the help! I'm using ansible 2.1.0 (devel > 5e18bc5955). > >> > My > >> > - output is... > >> > > >> > Unexpected Exception: integer division or modulo by zero > >> > the full traceback was: > >> > > >> > > >> > Traceback (most recent call last): > >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > > >> > sys.exit(cli.run()) > >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, > in > >> > run > >> > self.execute() > >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line > 99, > >> > in > >> > execute > >> > fn() > >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, > in > >> > execute_create > >> > self.editor.create_file(self.args[0]) > >> > File > "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > >> > line > >> > 341, in create_file > >> > self._edit_file_helper(filename) > >> > File > "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > >> > line > >> > 298, in _edit_file_helper > >> >
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
Hi Matt, thanks for the help! I'm creating a blank file to add content. I thought the process was use ansible-vault create filename.yml and then it opens in your default editor to add content. Mine is Vim 7.3. I'm getting the error on create. If I have an existing file with content already and use ansible-vault encrypt filename.yml it works fine. So does the decrypt command. On Thursday, January 21, 2016 at 12:26:36 PM UTC-5, Matt Martz wrote: > > What contents are you putting in the vault file? I can get this to happen > if I put nothing in the file. In which case the following is the cause: > > File > "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/parsing/vault/__init__.py", > > line 249, in _shred_file_custom > for _ in range(0, file_len // chunk_len): > ZeroDivisionError: integer division or modulo by zero > > But is this happening if you put content into the file? > > We should probably solve the above error regardless. > > Also, what EDITOR is being used on Ubuntu and Mac? Are they both vim? > What versions? > > On Thu, Jan 21, 2016 at 10:48 AM, Victor Keenan> wrote: > >> It works on Ubuntu for me too. Just not on Mac OS X. >> >> On Thursday, January 21, 2016 at 11:40:49 AM UTC-5, Brian Coca wrote: >>> >>> I cannot reproduce this ... but I'm on linux ... >>> >>> On Thu, Jan 21, 2016 at 11:09 AM, Victor Keenan >>> wrote: >>> > No, I'm trying to create a new file/vault. Here is what I'm entering >>> and the >>> > output... >>> > >>> > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ls -an >>> > total 0 >>> > drwxr-xr-x 2 501 20 68 Jan 21 11:07 . >>> > drwxr-xr-x 9 501 20 306 Jan 21 10:56 .. >>> > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ >>> ansible-vault >>> > create victor.yml - >>> > No config file found; using defaults >>> > New Vault password: >>> > Confirm New Vault password: >>> > ERROR! Unexpected Exception: [Errno 2] No such file or directory >>> > the full traceback was: >>> > >>> > >>> > Traceback (most recent call last): >>> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >>> >>> > sys.exit(cli.run()) >>> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, >>> in run >>> > self.execute() >>> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, >>> in >>> > execute >>> > fn() >>> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, >>> in >>> > execute_create >>> > self.editor.create_file(self.args[0]) >>> > File >>> "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line >>> > 344, in create_file >>> > self._edit_file_helper(filename) >>> > File >>> "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line >>> > 298, in _edit_file_helper >>> > call(self._editor_shell_command(tmp_path)) >>> > File >>> > >>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >>> >>> >>> > line 522, in call >>> > return Popen(*popenargs, **kwargs).wait() >>> > File >>> > >>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >>> >>> >>> > line 710, in __init__ >>> > errread, errwrite) >>> > File >>> > >>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", >>> >>> >>> > line 1335, in _execute_child >>> > raise child_exception >>> > OSError: [Errno 2] No such file or directory >>> > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ >>> > >>> > >>> > On Thursday, January 21, 2016 at 11:05:26 AM UTC-5, Brian Coca wrote: >>> >> >>> >> are you trying to edit a non existant file? >>> >> >>> >> On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenan >>> >> wrote: >>> >> > Thanks Brain! Progress, but now a different error... >>> >> > >>> >> > ERROR! Unexpected Exception: [Errno 2] No such file or directory >>> >> > the full traceback was: >>> >> > >>> >> > >>> >> > Traceback (most recent call last): >>> >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >>> >>> >> > sys.exit(cli.run()) >>> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line >>> 119, in >>> >> > run >>> >> > self.execute() >>> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line >>> 99, >>> >> > in >>> >> > execute >>> >> > fn() >>> >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line >>> 151, in >>> >> > execute_create >>> >> > self.editor.create_file(self.args[0]) >>> >> > File >>> "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >>> >> > line >>> >> > 344, in create_file >>> >> > self._edit_file_helper(filename) >>> >> > File >>> "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >>> >> > line >>> >> > 298, in _edit_file_helper >>>
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
I think I understand the issue, and based on my experimentation I have created an issue which you can find at https://github.com/ansible/ansible/issues/14055 On Thu, Jan 21, 2016 at 11:34 AM, Victor Keenanwrote: > Hi Matt, thanks for the help! > > I'm creating a blank file to add content. I thought the process was use > > ansible-vault create filename.yml > > and then it opens in your default editor to add content. Mine is Vim 7.3. > I'm getting the error on create. > > If I have an existing file with content already and use > > ansible-vault encrypt filename.yml > > it works fine. So does the decrypt command. > > On Thursday, January 21, 2016 at 12:26:36 PM UTC-5, Matt Martz wrote: >> >> What contents are you putting in the vault file? I can get this to >> happen if I put nothing in the file. In which case the following is the >> cause: >> >> File >> "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/parsing/vault/__init__.py", >> line 249, in _shred_file_custom >> for _ in range(0, file_len // chunk_len): >> ZeroDivisionError: integer division or modulo by zero >> >> But is this happening if you put content into the file? >> >> We should probably solve the above error regardless. >> >> Also, what EDITOR is being used on Ubuntu and Mac? Are they both vim? >> What versions? >> >> On Thu, Jan 21, 2016 at 10:48 AM, Victor Keenan >> wrote: >> >>> It works on Ubuntu for me too. Just not on Mac OS X. >>> >>> On Thursday, January 21, 2016 at 11:40:49 AM UTC-5, Brian Coca wrote: I cannot reproduce this ... but I'm on linux ... On Thu, Jan 21, 2016 at 11:09 AM, Victor Keenan wrote: > No, I'm trying to create a new file/vault. Here is what I'm entering and the > output... > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ls -an > total 0 > drwxr-xr-x 2 501 20 68 Jan 21 11:07 . > drwxr-xr-x 9 501 20 306 Jan 21 10:56 .. > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ansible-vault > create victor.yml - > No config file found; using defaults > New Vault password: > Confirm New Vault password: > ERROR! Unexpected Exception: [Errno 2] No such file or directory > the full traceback was: > > > Traceback (most recent call last): > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > sys.exit(cli.run()) > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in run > self.execute() > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in > execute > fn() > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > execute_create > self.editor.create_file(self.args[0]) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 344, in create_file > self._edit_file_helper(filename) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 298, in _edit_file_helper > call(self._editor_shell_command(tmp_path)) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 522, in call > return Popen(*popenargs, **kwargs).wait() > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 710, in __init__ > errread, errwrite) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 1335, in _execute_child > raise child_exception > OSError: [Errno 2] No such file or directory > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ > > > On Thursday, January 21, 2016 at 11:05:26 AM UTC-5, Brian Coca wrote: >> >> are you trying to edit a non existant file? >> >> On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenan >> wrote: >> > Thanks Brain! Progress, but now a different error... >> > >> > ERROR! Unexpected Exception: [Errno 2] No such file or directory >> > the full traceback was: >> > >> > >> > Traceback (most recent call last): >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >> > sys.exit(cli.run()) >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in >> > run >> > self.execute() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, >> > in >> > execute >> > fn() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in >> > execute_create >> > self.editor.create_file(self.args[0]) >> > File
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
Thanks for the help Matt. I'll follow the issue on Github. On Thursday, January 21, 2016 at 12:41:20 PM UTC-5, Matt Martz wrote: > > I think I understand the issue, and based on my experimentation I have > created an issue which you can find at > https://github.com/ansible/ansible/issues/14055 > > On Thu, Jan 21, 2016 at 11:34 AM, Victor Keenan> wrote: > >> Hi Matt, thanks for the help! >> >> I'm creating a blank file to add content. I thought the process was use >> >> ansible-vault create filename.yml >> >> and then it opens in your default editor to add content. Mine is Vim 7.3. >> I'm getting the error on create. >> >> If I have an existing file with content already and use >> >> ansible-vault encrypt filename.yml >> >> it works fine. So does the decrypt command. >> >> On Thursday, January 21, 2016 at 12:26:36 PM UTC-5, Matt Martz wrote: >>> >>> What contents are you putting in the vault file? I can get this to >>> happen if I put nothing in the file. In which case the following is the >>> cause: >>> >>> File >>> "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/parsing/vault/__init__.py", >>> >>> line 249, in _shred_file_custom >>> for _ in range(0, file_len // chunk_len): >>> ZeroDivisionError: integer division or modulo by zero >>> >>> But is this happening if you put content into the file? >>> >>> We should probably solve the above error regardless. >>> >>> Also, what EDITOR is being used on Ubuntu and Mac? Are they both vim? >>> What versions? >>> >>> On Thu, Jan 21, 2016 at 10:48 AM, Victor Keenan >>> wrote: >>> It works on Ubuntu for me too. Just not on Mac OS X. On Thursday, January 21, 2016 at 11:40:49 AM UTC-5, Brian Coca wrote: > > I cannot reproduce this ... but I'm on linux ... > > On Thu, Jan 21, 2016 at 11:09 AM, Victor Keenan > wrote: > > No, I'm trying to create a new file/vault. Here is what I'm entering > and the > > output... > > > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ ls -an > > total 0 > > drwxr-xr-x 2 501 20 68 Jan 21 11:07 . > > drwxr-xr-x 9 501 20 306 Jan 21 10:56 .. > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ > ansible-vault > > create victor.yml - > > No config file found; using defaults > > New Vault password: > > Confirm New Vault password: > > ERROR! Unexpected Exception: [Errno 2] No such file or directory > > the full traceback was: > > > > > > Traceback (most recent call last): > > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > > > sys.exit(cli.run()) > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, > in run > > self.execute() > > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line > 99, in > > execute > > fn() > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, > in > > execute_create > > self.editor.create_file(self.args[0]) > > File > "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > > 344, in create_file > > self._edit_file_helper(filename) > > File > "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > > 298, in _edit_file_helper > > call(self._editor_shell_command(tmp_path)) > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 522, in call > > return Popen(*popenargs, **kwargs).wait() > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 710, in __init__ > > errread, errwrite) > > File > > > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > > > > line 1335, in _execute_child > > raise child_exception > > OSError: [Errno 2] No such file or directory > > local ...pment/Ansible_Playbooks/server_lepr/vars(master) $ > > > > > > On Thursday, January 21, 2016 at 11:05:26 AM UTC-5, Brian Coca > wrote: > >> > >> are you trying to edit a non existant file? > >> > >> On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenan > > >> wrote: > >> > Thanks Brain! Progress, but now a different error... > >> > > >> > ERROR! Unexpected Exception: [Errno 2] No such file or directory > >> > the full traceback was: > >> > > >> > > >> > Traceback (most recent call last): > >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > > >> > sys.exit(cli.run()) > >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line > 119,
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
Thanks Brain! Progress, but now a different error... ERROR! Unexpected Exception: [Errno 2] No such file or directory the full traceback was: Traceback (most recent call last): File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in sys.exit(cli.run()) File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in run self.execute() File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in execute fn() File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in execute_create self.editor.create_file(self.args[0]) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 344, in create_file self._edit_file_helper(filename) File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line 298, in _edit_file_helper call(self._editor_shell_command(tmp_path)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py" , line 522, in call return Popen(*popenargs, **kwargs).wait() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py" , line 710, in __init__ errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py" , line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory On Thursday, January 21, 2016 at 10:51:57 AM UTC-5, Brian Coca wrote: > > fixed via > http://github.com/ansible/ansible/commit/f26adcc7da7f8e6605167203249648f7b0e74fb7 > > > On Thu, Jan 21, 2016 at 10:28 AM, Victor Keenan> wrote: > > Thanks Brian for the help! I'm using ansible 2.1.0 (devel 5e18bc5955). > My > > - output is... > > > > Unexpected Exception: integer division or modulo by zero > > the full traceback was: > > > > > > Traceback (most recent call last): > > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > > sys.exit(cli.run()) > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in > run > > self.execute() > > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, > in > > execute > > fn() > > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > > execute_create > > self.editor.create_file(self.args[0]) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 341, in create_file > > self._edit_file_helper(filename) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 298, in _edit_file_helper > > self._shred_file(tmp_path) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 281, in _shred_file > > self._shred_file_custom(tmp_path) > > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", > line > > 248, in _shred_file_custom > > for _ in range(0, file_len // chunk_len): > > ZeroDivisionError: integer division or modulo by zero > > > > > > On Thursday, January 21, 2016 at 10:06:40 AM UTC-5, Brian Coca wrote: > >> > >> what version are you using? there was a bug that caused this but it > >> has been fixed. Also output with - would be helfpul > >> > >> > >> > >> > >> -- > >> Brian Coca > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Ansible Project" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to ansible-proje...@googlegroups.com . > > To post to this group, send email to ansible...@googlegroups.com > . > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/d48e57ba-1415-413e-93a1-f4b8b348d3e3%40googlegroups.com. > > > > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Brian Coca > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/de784f85-37ba-43dc-9f55-6848fdd4070e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Ansible-Vault Error: Unexpected Exception: integer division or modulo by zero
are you trying to edit a non existant file? On Thu, Jan 21, 2016 at 11:01 AM, Victor Keenanwrote: > Thanks Brain! Progress, but now a different error... > > ERROR! Unexpected Exception: [Errno 2] No such file or directory > the full traceback was: > > > Traceback (most recent call last): > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in > sys.exit(cli.run()) > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in run > self.execute() > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, in > execute > fn() > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in > execute_create > self.editor.create_file(self.args[0]) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 344, in create_file > self._edit_file_helper(filename) > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", line > 298, in _edit_file_helper > call(self._editor_shell_command(tmp_path)) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 522, in call > return Popen(*popenargs, **kwargs).wait() > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 710, in __init__ > errread, errwrite) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", > line 1335, in _execute_child > raise child_exception > OSError: [Errno 2] No such file or directory > > > On Thursday, January 21, 2016 at 10:51:57 AM UTC-5, Brian Coca wrote: >> >> fixed via >> http://github.com/ansible/ansible/commit/f26adcc7da7f8e6605167203249648f7b0e74fb7 >> >> On Thu, Jan 21, 2016 at 10:28 AM, Victor Keenan >> wrote: >> > Thanks Brian for the help! I'm using ansible 2.1.0 (devel 5e18bc5955). >> > My >> > - output is... >> > >> > Unexpected Exception: integer division or modulo by zero >> > the full traceback was: >> > >> > >> > Traceback (most recent call last): >> > File "/Users/VictorSK/ansible/bin/ansible-vault", line 85, in >> > sys.exit(cli.run()) >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 119, in >> > run >> > self.execute() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/__init__.py", line 99, >> > in >> > execute >> > fn() >> > File "/Users/VictorSK/ansible/lib/ansible/cli/vault.py", line 151, in >> > execute_create >> > self.editor.create_file(self.args[0]) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> > line >> > 341, in create_file >> > self._edit_file_helper(filename) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> > line >> > 298, in _edit_file_helper >> > self._shred_file(tmp_path) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> > line >> > 281, in _shred_file >> > self._shred_file_custom(tmp_path) >> > File "/Users/VictorSK/ansible/lib/ansible/parsing/vault/__init__.py", >> > line >> > 248, in _shred_file_custom >> > for _ in range(0, file_len // chunk_len): >> > ZeroDivisionError: integer division or modulo by zero >> > >> > >> > On Thursday, January 21, 2016 at 10:06:40 AM UTC-5, Brian Coca wrote: >> >> >> >> what version are you using? there was a bug that caused this but it >> >> has been fixed. Also output with - would be helfpul >> >> >> >> >> >> >> >> >> >> -- >> >> Brian Coca >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "Ansible Project" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an >> > email to ansible-proje...@googlegroups.com. >> > To post to this group, send email to ansible...@googlegroups.com. >> > To view this discussion on the web visit >> > >> > https://groups.google.com/d/msgid/ansible-project/d48e57ba-1415-413e-93a1-f4b8b348d3e3%40googlegroups.com. >> > >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> Brian Coca > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/de784f85-37ba-43dc-9f55-6848fdd4070e%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit