我申請了一個簡單的腳本來測試發送問題通過Python JIRA,如何使用JIRA,Python創建問題
from jira import JIRA
jira_options={'server': 'https://jira.baidu.com', 'verify': False}
jira=JIRA(options=jira_options,basic_auth=('testuser','passw0rd'))
new_issue = jira.create_issue(project={'key': 'test'}, summary='New issue from jira-python', description='Look into this one', issuetype={'name': 'Bug'})
,但得到的錯誤:
/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:821: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
Traceback (most recent call last):
File "test.py", line 5, in <module>
jira=JIRA(options=jira_options,basic_auth=('testuser','passw0rd'))
File "/usr/lib/python2.7/site-packages/jira/client.py", line 317, in __init__
si = self.server_info()
File "/usr/lib/python2.7/site-packages/jira/client.py", line 1771, in server_info
j = self._get_json('serverInfo')
File "/usr/lib/python2.7/site-packages/jira/client.py", line 2172, in _get_json
r = self._session.get(url, params=params)
File "/usr/lib/python2.7/site-packages/jira/resilientsession.py", line 150, in get
return self.__verb('GET', url, **kwargs)
File "/usr/lib/python2.7/site-packages/jira/resilientsession.py", line 146, in __verb
raise_on_error(response, verb=verb, **kwargs)
File "/usr/lib/python2.7/site-packages/jira/resilientsession.py", line 56, in raise_on_error
r.status_code, error, r.url, request=request, response=r, **kwargs)
jira.exceptions.JIRAError: <exception str() failed>
如何解決這個?
我試過很多次,都開始從該行彈出了錯誤:\ n JIRA(選項= jira_options,basic_auth =( 'testuser的', 'PASSW0RD')) – John
我試圖導入JIRA兩個jira&jira.client庫,都發生了同樣的錯誤... – John
我試圖回答這個問題,但爲什麼每次我提交我的答案,它不顯示? – John