Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to make connection between JIRA and Python

Ashish
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 21, 2021

I'm trying to connect to Jira using python, but my python applications gets stopped after running for almost 1-2 minutes long. Basically it shows: "python.exe has stopped working"

My code is as below:

#import libraries
from jira import JIRA    
from jira.exceptions import JIRAError    
import sys    
options = {'server': 'https://sipcg.atlassian.net'}    

try:    
    print("start!")    
    jira = JIRA(options=options, auth=('xyz', 'xyz'))    
except JIRAError as e:    
    if e.status_code == 401:    
        print ("Login to JIRA failed. Check your username and password")    
print ("done!")    

#Please help me in order to connect using jiracli    
#Note: ignore the python indentation attached here 

 

1 answer

0 votes
Thomas Deiler
Community Champion
April 28, 2021

Dear @Ashish ,

when debugging problems, I always send the rest call from script with a REST API browser extension to verify.

Have you done this already? I could be an authentication error. It could be a Web Proxy issue. (The traffic of the browser is filtered by a company proxy - on command line request run into the void). It could be a firewall issue (tried to telnet the server?)

So long

Thomas

Thomas Deiler
Community Champion
May 10, 2021

Dear @Ashish ,

was my answer useful? Then I would be happy when you click on the "green accept answer" button.

So long
Thomas

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events