Forums

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

create jira using python's task create_issue, but failed "HTTP 405"

罗荣挺
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!
November 14, 2021

I can access jira system and get issue info by python. But when I tried to create issue, got error response.

 

>>> new1=jira.create_issue(new)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\rongtluo\AppData\Local\Programs\Python\Python310\lib\site-packages\jira\client.py", line 1315, in create_issue
    r = self._session.post(url, data=json.dumps(data))
  File "C:\Users\rongtluo\AppData\Local\Programs\Python\Python310\lib\site-packages\jira\resilientsession.py", line 175, in post
    return self.__verb("POST", url, **kwargs)
  File "C:\Users\rongtluo\AppData\Local\Programs\Python\Python310\lib\site-packages\jira\resilientsession.py", line 168, in __verb
    raise_on_error(response, verb=verb, **kwargs)
  File "C:\Users\rongtluo\AppData\Local\Programs\Python\Python310\lib\site-packages\jira\resilientsession.py", line 53, in raise_on_error
    raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 405 url: https://<my_jira_url>/rest/api/2/issue
 
        response headers = {'X-AREQUESTID': '724x5683859x3', 'X-ASESSIONID': '1xsfs9o', 'X-ANODEID': 'node3', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000', 'X-Seraph-LoginReason': 'OK', 'X-AUSERNAME': 'rongtluo', 'Allow': 'POST,OPTIONS', 'Content-Encoding': 'gzip', 'Vary': 'User-Agent', 'Content-Type': 'text/html;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Date': 'Fri, 12 Nov 2021 17:04:09 GMT', 'Keep-Alive': 'timeout=20', 'Connection': 'keep-alive'}
        response text =

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events