Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jira-Python - jira.client import error

I was installing jira-python like written in the docs

$ pip install jira-python

but after installation I try to run the example:

from jira.client import JIRA
options = {
    'server': 'https://jira.atlassian.com'
}
jira = JIRA(options)

projects = jira.projects()

keys = sorted([project.key for project in projects])[2:5]

issue = jira.issue('JRA-1330')

import re
atl_comments = [comment for comment in issue.fields.comment.comments
                if re.search(r'@atlassian.com$', comment.author.emailAddress)]

jira.add_comment(issue, 'Comment text')

issue.update(summary="I'm different!", description='Changed the summary to be different.')

issue.delete()

getting the following error:

**Traceback (most recent call last):
  File "jira.py", line 4, in <module>
    from jira.client import JIRA
  File "/home/ubuntu/jira.py", line 4, in <module>
    from jira.client import JIRA
ImportError: No module named client**

Any idea about the problem here? I tried it also on an Amazon instance, but same problem...

like image 546
Jack Smith Avatar asked Nov 29 '22 16:11

Jack Smith


1 Answers

seems like the reason was that my test file was named jira.py :) thanks for your help Inbar!

like image 129
Jack Smith Avatar answered Dec 05 '22 13:12

Jack Smith