Got 500 error while initializing Jira object using python library

Laxminarsaiah Ragi December 18, 2019

Hi There,

Getting 500 jira.exceptions.JIRAError: JiraError HTTP 500 URL https://jira.somename/rest/api/2/serverInfo 

def _get_jira_instance(self):
props = self.parser
oauth_dict = {'access_token_secret': None,
'access_token': self.parse_prop('jira_accesstoken', props),
'consumer_key': self.parse_prop('jira_consumerkey', props),
'key_cert': self.read_jira_ppk()
}
server = self.parse_prop('jira_server', props)
print(oauth_dict)
options = dict(server=server)
print(options)
return JIRA(options, oauth=oauth_dict)

All the values like access_token etc are coming from a file.

Any one please tell me what could be the problem in the above code?

Thanks,
Laxmi

 

1 answer

0 votes
brbojorque
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 18, 2019

You can do the debugging by getting the response from the request.

At the moment I can't find any reason why it should be a 500 error, it just means there is something wrong in the server when you requested it.

Laxminarsaiah Ragi December 18, 2019

Hi Bryan,

Thank you for the quick response.

When I see the error response I don't find any error message like access token missing or token has expired something like that, but i unable to get the problem

 

Thanks again.

brbojorque
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 18, 2019

Hi @Laxminarsaiah Ragi ,

What python library you are using? 

I would like to try it myself and also are you using Jira Cloud or Server?

brbojorque
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 18, 2019

I would suggest to not use any library yet.

Please follow the guide in accessing the API in this link. 

I just tested it and it works.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/

Suggest an answer

Log in or Sign up to answer