python : cannot import name JIRA
up vote
6
down vote
favorite
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()
python python-2.7 python-3.x jira python-jira
add a comment |
up vote
6
down vote
favorite
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()
python python-2.7 python-3.x jira python-jira
Possible duplicate of ImportError: Cannot import name X
– nbrooks
Jan 12 '17 at 20:02
add a comment |
up vote
6
down vote
favorite
up vote
6
down vote
favorite
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()
python python-2.7 python-3.x jira python-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()
python python-2.7 python-3.x jira python-jira
python python-2.7 python-3.x jira python-jira
asked Jan 12 '17 at 19:38
Scooby
94162153
94162153
Possible duplicate of ImportError: Cannot import name X
– nbrooks
Jan 12 '17 at 20:02
add a comment |
Possible duplicate of ImportError: Cannot import name X
– nbrooks
Jan 12 '17 at 20:02
Possible duplicate of ImportError: Cannot import name X
– nbrooks
Jan 12 '17 at 20:02
Possible duplicate of ImportError: Cannot import name X
– nbrooks
Jan 12 '17 at 20:02
add a comment |
3 Answers
3
active
oldest
votes
up vote
12
down vote
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.
1
I'd like to note that you can turn on absolute import paths and keep your file named jira.py if it makes sense to you to do that
– std''OrgnlDave
Jan 12 '17 at 20:16
@std''OrgnlDave Can you explain how?
– MonkeyMonkey
Jun 21 '17 at 19:57
@MonkeyMonkey added an answer explaining how
– HMagdy
Apr 13 at 13:59
add a comment |
up vote
0
down vote
In addition to @Organ note
I'd like to note that you can turn on absolute import paths and keep
your file named jira.py if it makes sense to you to do that
In my case, I did this twice:
from jira import JIRA
jira = JIRA(URL_JIRA, basic_auth=('abc', '123'))
So in the first show, it's working good because jira
is the global namespace but in second usage it doesn't because jira
became just instance of JIRA.
This is my solution based on Organ's note:
import jira.client
x = jira.client.JIRA(URL_JIRA, basic_auth=('123', 'abc'))
Here, you can keep having jira.py and use these lines as much as you need.
add a comment |
up vote
0
down vote
I started getting this error when I installed python 3.6,earlier I had python 2.7.
and jira was working.
I renamed the python3.6 exe as python3 and python 2.7 exe as python,
issue got resolved
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
12
down vote
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.
1
I'd like to note that you can turn on absolute import paths and keep your file named jira.py if it makes sense to you to do that
– std''OrgnlDave
Jan 12 '17 at 20:16
@std''OrgnlDave Can you explain how?
– MonkeyMonkey
Jun 21 '17 at 19:57
@MonkeyMonkey added an answer explaining how
– HMagdy
Apr 13 at 13:59
add a comment |
up vote
12
down vote
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.
1
I'd like to note that you can turn on absolute import paths and keep your file named jira.py if it makes sense to you to do that
– std''OrgnlDave
Jan 12 '17 at 20:16
@std''OrgnlDave Can you explain how?
– MonkeyMonkey
Jun 21 '17 at 19:57
@MonkeyMonkey added an answer explaining how
– HMagdy
Apr 13 at 13:59
add a comment |
up vote
12
down vote
up vote
12
down vote
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.
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.
answered Jan 12 '17 at 20:00
Scooby
94162153
94162153
1
I'd like to note that you can turn on absolute import paths and keep your file named jira.py if it makes sense to you to do that
– std''OrgnlDave
Jan 12 '17 at 20:16
@std''OrgnlDave Can you explain how?
– MonkeyMonkey
Jun 21 '17 at 19:57
@MonkeyMonkey added an answer explaining how
– HMagdy
Apr 13 at 13:59
add a comment |
1
I'd like to note that you can turn on absolute import paths and keep your file named jira.py if it makes sense to you to do that
– std''OrgnlDave
Jan 12 '17 at 20:16
@std''OrgnlDave Can you explain how?
– MonkeyMonkey
Jun 21 '17 at 19:57
@MonkeyMonkey added an answer explaining how
– HMagdy
Apr 13 at 13:59
1
1
I'd like to note that you can turn on absolute import paths and keep your file named jira.py if it makes sense to you to do that
– std''OrgnlDave
Jan 12 '17 at 20:16
I'd like to note that you can turn on absolute import paths and keep your file named jira.py if it makes sense to you to do that
– std''OrgnlDave
Jan 12 '17 at 20:16
@std''OrgnlDave Can you explain how?
– MonkeyMonkey
Jun 21 '17 at 19:57
@std''OrgnlDave Can you explain how?
– MonkeyMonkey
Jun 21 '17 at 19:57
@MonkeyMonkey added an answer explaining how
– HMagdy
Apr 13 at 13:59
@MonkeyMonkey added an answer explaining how
– HMagdy
Apr 13 at 13:59
add a comment |
up vote
0
down vote
In addition to @Organ note
I'd like to note that you can turn on absolute import paths and keep
your file named jira.py if it makes sense to you to do that
In my case, I did this twice:
from jira import JIRA
jira = JIRA(URL_JIRA, basic_auth=('abc', '123'))
So in the first show, it's working good because jira
is the global namespace but in second usage it doesn't because jira
became just instance of JIRA.
This is my solution based on Organ's note:
import jira.client
x = jira.client.JIRA(URL_JIRA, basic_auth=('123', 'abc'))
Here, you can keep having jira.py and use these lines as much as you need.
add a comment |
up vote
0
down vote
In addition to @Organ note
I'd like to note that you can turn on absolute import paths and keep
your file named jira.py if it makes sense to you to do that
In my case, I did this twice:
from jira import JIRA
jira = JIRA(URL_JIRA, basic_auth=('abc', '123'))
So in the first show, it's working good because jira
is the global namespace but in second usage it doesn't because jira
became just instance of JIRA.
This is my solution based on Organ's note:
import jira.client
x = jira.client.JIRA(URL_JIRA, basic_auth=('123', 'abc'))
Here, you can keep having jira.py and use these lines as much as you need.
add a comment |
up vote
0
down vote
up vote
0
down vote
In addition to @Organ note
I'd like to note that you can turn on absolute import paths and keep
your file named jira.py if it makes sense to you to do that
In my case, I did this twice:
from jira import JIRA
jira = JIRA(URL_JIRA, basic_auth=('abc', '123'))
So in the first show, it's working good because jira
is the global namespace but in second usage it doesn't because jira
became just instance of JIRA.
This is my solution based on Organ's note:
import jira.client
x = jira.client.JIRA(URL_JIRA, basic_auth=('123', 'abc'))
Here, you can keep having jira.py and use these lines as much as you need.
In addition to @Organ note
I'd like to note that you can turn on absolute import paths and keep
your file named jira.py if it makes sense to you to do that
In my case, I did this twice:
from jira import JIRA
jira = JIRA(URL_JIRA, basic_auth=('abc', '123'))
So in the first show, it's working good because jira
is the global namespace but in second usage it doesn't because jira
became just instance of JIRA.
This is my solution based on Organ's note:
import jira.client
x = jira.client.JIRA(URL_JIRA, basic_auth=('123', 'abc'))
Here, you can keep having jira.py and use these lines as much as you need.
answered Apr 13 at 13:59
HMagdy
2,3722741
2,3722741
add a comment |
add a comment |
up vote
0
down vote
I started getting this error when I installed python 3.6,earlier I had python 2.7.
and jira was working.
I renamed the python3.6 exe as python3 and python 2.7 exe as python,
issue got resolved
add a comment |
up vote
0
down vote
I started getting this error when I installed python 3.6,earlier I had python 2.7.
and jira was working.
I renamed the python3.6 exe as python3 and python 2.7 exe as python,
issue got resolved
add a comment |
up vote
0
down vote
up vote
0
down vote
I started getting this error when I installed python 3.6,earlier I had python 2.7.
and jira was working.
I renamed the python3.6 exe as python3 and python 2.7 exe as python,
issue got resolved
I started getting this error when I installed python 3.6,earlier I had python 2.7.
and jira was working.
I renamed the python3.6 exe as python3 and python 2.7 exe as python,
issue got resolved
answered Nov 10 at 15:08
sgupt
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f41621566%2fpython-cannot-import-name-jira%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Possible duplicate of ImportError: Cannot import name X
– nbrooks
Jan 12 '17 at 20:02