gvalkov / jenkins-autojobs

Automatically create Jenkins jobs from template jobs and branches in a SCM repository
http://jenkins-autojobs.rtfd.org
Other
49 stars 39 forks source link

If python-jenkins is installed, autojobs end with error #61

Open h133gqa opened 7 years ago

h133gqa commented 7 years ago

If you install python-jenkins in parallel to jenkins-webapi (via pip) you receive an error by calling one of the jenkins-makejob-* scripts.

Traceback (most recent call last): File "/usr/local/bin/jenkins-makejobs-git", line 9, in load_entry_point('jenkins-autojobs==0.17.4', 'console_scripts', 'jenkins-makejobs-git')() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2279, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load entry = import(self.module_name, globals(),globals(), ['name']) File "/usr/local/lib/python2.7/dist-packages/jenkins_autojobs/git.py", line 16, in from . import job, main, utils File "/usr/local/lib/python2.7/dist-packages/jenkins_autojobs/main.py", line 19, in from jenkins import Jenkins, JenkinsError ImportError: No module named jenkins

Quick Solution: 'pip uninstall python-jenkins && pip uninstall jenkins-webapi' check if /usr/local/lib/python2.7/dist-packages/ has no entries for jenkins-webapi or python-jenkins left. 'pip install jenkins-webapi' then it worked here.