Traceback (most recent call last):
File “/Users/xxxx/PycharmProjects/untitled/jenkins.py”, line 3, in
import jenkins
File “/Users/xxxx/PycharmProjects/untitled/jenkins.py”, line 16, in
server = jenkins.Jenkins(‘http://localhost:8080’, username=user_id, password=api_token)
AttributeError: module ‘jenkins’ has no attribute ‘Jenkins’
报错内容如上
我的文件名和jenkins同名,我修改了文件名,就正常了