Reputation: 163
I am executing my script on Mac (macOS 10.14.1) using Python (2.7.10). This is what i have in my script:
server_jenkins = jenkins.Jenkins(JENKINS_URL, username=JENKINS_USER, password=JENKINS_PASS)
And this is the error i am getting:
AttributeError: 'module' object has no attribute 'Jenkins'
Upvotes: 0
Views: 1436
Reputation: 11
That's because you using the wrong package, to solve this problem, please use the flowing commands
sudo pip uninstall jenkins
sudo pip install python-jenkins
Upvotes: 1
Reputation: 4360
The error means that jenkins
module has no class (read attribute) named Jenkins
. Since this is not true for the actual jenkins
module, it is likely that you have a file called jenkins.py
which is being read and processed by the code.
Upvotes: 0