ImportError: No module named six.moves

4,206 views
Skip to first unread message

William Attwood

unread,
May 20, 2015, 8:41:00 AM5/20/15
to ansible...@googlegroups.com
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 <module>
    from jenkins_jobs.cmd import main
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 17, in <module>
    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.  

Toshio Kuratomi

unread,
May 21, 2015, 12:19:43 AM5/21/15
to ansible...@googlegroups.com

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

> --
> 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/49bde536-b476-4cc0-8e0a-f20d300d4338%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

William Attwood

unread,
May 27, 2015, 1:02:26 PM5/27/15
to ansible...@googlegroups.com
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:

---
- name: install pip
  easy_install: name=pip

- name: install pbr
  pip: name=pbr

- name: download jenkins-job-builder
  git:
    dest: /opt/jenkins-job-builder
    version: 1.1.0
    update: no
  register: jjb_git


- name: copy jenkins job builder config
  copy: src=jenkins_job_builder/setup.cfg dest=/opt/jenkins-job-builder/setup.cfg mode=0644
  register: jjb_config

- name: copy jenkins job builder modules
  copy: src=jenkins_job_builder/modules/{{item}}.py dest=/opt/jenkins-job-builder/jenkins_jobs/modules/{{item}}.py mode=0644
  with_items:
    - artifactory
    - gradle
    - rundeck
    - graphite
  register: jjb_module

- name: install jenkins-job-builder
  command: python setup.py install
  args:
    chdir: /opt/jenkins-job-builder
  when: jjb_git.changed or jjb_config.changed or jjb_module.changed

William Attwood

unread,
May 27, 2015, 2:46:08 PM5/27/15
to ansible...@googlegroups.com
Seems pip went from 6.1.1 to 7.0.1.  Working on resolving issues.

Simon Forsberg

unread,
Jun 8, 2015, 10:20:23 AM6/8/15
to ansible...@googlegroups.com
Hello,

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

Did you come up with a solution?

Thanks,
Simon

William Attwood

unread,
Jun 8, 2015, 11:45:29 AM6/8/15
to ansible...@googlegroups.com
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 

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/mlBxxFkvNwM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages