2

I was trying to run this jira script and its been a couple of hours can't
quite figure out what the issue is. can someone help me. I get the following error.

Traceback (most recent call last):

File "mytest.py", line 2, in

from jira.client import JIRA

ImportError: No module named 'jira'

 from jira.client import JIRA
import json
import csv

options = {'server':  'https://jira.myjira.com/', 'verify':False}

jira = JIRA(options)

issues = jira.search_issues('project=DCE and created > -365d ORDER BY key      
DESC',maxResults=10000,fields='id,key,customfield')

f = open("test.csv", "w",newline="")
writer = csv.writer(f, delimiter='|')


for issue in issues:
fl =    
 [issue.key,issue.fields.status.name,issue.fields.customfield]
writer.writerow(fl)

f.close()
1
  • Personally, I solved with this python3.10 -m pip install atlassian-python-api Commented May 23, 2023 at 14:55

5 Answers 5

6
  • Please, try pip install jira

  • If not, please check if your script is named jira.py... If so, rename it to another name such as my-test-jira.py or similar.

Sign up to request clarification or add additional context in comments.

Comments

1

Your Python can't see that the jira module is installed.

http://pythonhosted.org/jira/#installation

Comments

1

Download and install using pip install jira or easy_install jira

Comments

1

The correct code for importing Jira is:

from jira import JIRA

Comments

0

Simple manual steps to fix this issue which I followed:

Go to Settings-> Python Interpreter -> Click on Plus (+) sign from left nav (that says "Install") beside "Latest version" column .

Type "jira" and choose it's available versions and Click on button "Install Package" and wait for its installation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.