Hi.
I am trying to do something very simple.
#!/usr/bin/python
from jira import JIRA
options = { 'server' : 'http://x.x.x.x:9090'}
jira = JIRA(options,basic_auth=('username', 'password'))
projects = jira.projects()
print (projects)
And I get these errors. How do I resolve this?
Traceback (most recent call last):
File "C:\Dropbox\jira\req_jira2.py", line 21, in <module>
jira = JIRA(options,basic_auth=('username', 'password'))
File "C:\Python3\lib\site-packages\jira\client.py", line 472, in __init__
si = self.server_info()
File "C:\Python3\lib\site-packages\jira\client.py", line 2133, in server_info
j = self._get_json('serverInfo')
File "C:\Python3\lib\site-packages\jira\client.py", line 2549, in _get_json
r = self._session.get(url, params=params)
File "C:\Python3\lib\site-packages\jira\resilientsession.py", line 151, in get
return self.__verb('GET', url, **kwargs)
File "C:\Python3\lib\site-packages\jira\resilientsession.py", line 147, in __verb
raise_on_error(response, verb=verb, **kwargs)
File "C:\Python3\lib\site-packages\jira\resilientsession.py", line 57, in raise_on_error
r.status_code, error, r.url, request=request, response=r, **kwargs)
jira.exceptions.JIRAError: JiraError HTTP 404 url: http://x.x.x.x:9090/rest/api/2/serverInfo
text: <!DOCTYPE html><html><head><title>Apache Tomcat/8.5.9 - Error report</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style> </head><body><h1>HTTP Status 404 - /rest/api/2/serverInfo</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>/rest/api/2/serverInfo</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/8.5.9</h3></body></html>
response headers = {'Content-Type': 'text/html;charset=utf-8', 'Content-Language': 'en', 'Content-Length': '1028', 'Date': 'Fri, 26 Oct 2018 21:10:27 GMT'}
response text = <!DOCTYPE html><html><head><title>Apache Tomcat/8.5.9 - Error report</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style> </head><body><h1>HTTP Status 404 - /rest/api/2/serverInfo</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>/rest/api/2/serverInfo</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/8.5.9</h3></body></html>