Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python : cannot import name JIRA

I have already done pip install jira

but when I run the following it fails with ImportError: cannot import name JIRA

import re
from jira import JIRA

jira = JIRA('https://issues.net')
# all values are samples and won't work in your code!
key_cert_data = None
key_cert_file = "cert/jiraprivatekey.pub"
with open(key_cert, 'r') as key_cert_file:
    key_cert_data = key_cert_file.read()
like image 751
Scooby Avatar asked Jan 12 '17 19:01

Scooby


1 Answers

fixed it.

The file I was running was called jira.py so when I did from

jira import JIRA

It was trying to look up self.

like image 125
Scooby Avatar answered Sep 24 '22 15:09

Scooby