Forums

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

I want to communicate with Jira through an Ubuntu machine

Sachin Jadhav January 7, 2025

Hello Team,

Previously, I was able to communicate using the username and password, but now I am unable to do so

 

jira version: JIRA v7.3.6 

1 answer

0 votes
Mahesh Shinde
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2025

Hi @Sachin Jadhav

Welcome to Atlassian Community!

Could you please, tell me are you trying to access the Jira application through any script? or through browser? any error are you getting while accessing the Jira?

Regards,
Mahesh Shinde

Sachin Jadhav January 7, 2025

Hello @Mahesh Shinde 

 

I am trying to access jira through python script on ubuntu machine

Mahesh Shinde
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 8, 2025

Hi @Sachin Jadhav

are you getting any error while running the script?

what are the REST API call are you using to authenticate Jira?

Regards,

Mahesh Shinde

Sachin Jadhav January 8, 2025

Hello @Mahesh Shinde 

 

showing following error:

json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\Users\12796\Downloads\python\test2jira.py", line 9, in <module>
jira = JIRA(jira_url, basic_auth=(username, password))
File "C:\Users\12796\AppData\Roaming\Python\Python310\site-packages\jira\client.py", line 580, in __init__
si = self.server_info()
File "C:\Users\12796\AppData\Roaming\Python\Python310\site-packages\jira\client.py", line 3191, in server_info
j = self._get_json("serverInfo")
File "C:\Users\12796\AppData\Roaming\Python\Python310\site-packages\jira\client.py", line 3938, in _get_json
raise e
File "C:\Users\12796\AppData\Roaming\Python\Python310\site-packages\jira\client.py", line 3935, in _get_json
r_json = json_loads(r)
File "C:\Users\12796\AppData\Roaming\Python\Python310\site-packages\jira\utils\__init__.py", line 76, in json_loads
return resp.json()
File "C:\Users\12796\AppData\Roaming\Python\Python310\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 3 column 1 (char 4)

Mahesh Shinde
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2025

Hi @Sachin Jadhav

As per the error, the output getting from call is not in correct format or getting error.
Can you please, check the serverinfo REST API call accessing through the CURL command and compare the same output getting from script?

Using curl command try this REST API from article:
https://docs.atlassian.com/software/jira/docs/api/REST/9.12.0/#api/2/serverInfo-getServerInfo
 
Regards,
Mahesh Shinde

Suggest an answer

Log in or Sign up to answer