首页 > 解决方案 > 无法在 JIRA 和 Python 之间建立连接

问题描述

我正在尝试使用 python 连接到 Jira,但我的 python 应用程序在运行近 1-2 分钟后停止。基本上它显示:“python.exe 已停止工作”

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

标签: pythonauthenticationjira-cli

解决方案


推荐阅读