test-module fails during arg parsing with "zero length field name in format"

325 views
Skip to first unread message

Larry Fast

unread,
Nov 17, 2015, 12:47:15 PM11/17/15
to Ansible Project
I'm just starting to develop my first module and test-module gives me an error during arg parsing. So I tried running test-module against ping.py and got the same error.  See below.  My first guess is it's a python 2.6.6 problem. Any other ideas?

> ansible/hacking/test-module -m  ansible/lib/ansible/modules/core/system/ping.py

Traceback (most recent call last):
  File "ansible/hacking/test-module", line 207, in <module>
    main()
  File "ansible/hacking/test-module", line 189, in main
    options, args = parse()
  File "ansible/hacking/test-module", line 67, in parse
    default='python={}'.format(sys.executable))
ValueError: zero length field name in format

Matt Martz

unread,
Nov 17, 2015, 4:03:33 PM11/17/15
to ansible...@googlegroups.com
It is a 2.6 issue.  Put a 0 in the {}

Such as:

default='python={0}'.format(sys.executable))
--
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/07603a1c-9286-42e8-aaba-4cd62316f01d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Reply all
Reply to author
Forward
0 new messages