ImportError: No module named six.moves

Running Ansible 1.9.1 and Vagrant 1.7.2. Recently, without code changes, and with software version updates, every job .yml file when doing a vagrant provision resulted in:

stderr: Traceback (most recent call last):
File “/bin/jenkins-jobs”, line 6, in
from jenkins_jobs.cmd import main
File “/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py”, line 17, in
from six.moves import configparser, StringIO
ImportError: No module named six.moves

This will repeat for every job .yml file. If I go into the machine it is failing on, and pip install six, it then starts to fail on the jenkins module, and so on and so forth.

Hmm… how does ansible figure into this? Looking at the traceback it seems like the jenkins-job tool is somehow miss-installed (it’s not finding its required libraries).

-Toshio

Nothing changed in the Ansible code for this deploy, however, the installation for job builder is breaking. It’s only after Ansible and/or Vagrant were upgraded:

Seems pip went from 6.1.1 to 7.0.1. Working on resolving issues.

Hello,

I’m having the exact same issue. Havent done any changes.

Did you come up with a solution?

Thanks,
Simon

Turns out this is a problem with the python module and jenkins job builder. We had to manually run the requirements to have it pull them in after job builder tasks were completed.

name: install jenkins-job-builder dependencies

command: pip install -r requirements.txt

WILLIAM A. | Tooling – DevOps | ext. 5494