Getting json.decoder.JSONDecodeError while trying to get all JIRA users using Python Script

Shreesh Narayan Singh September 5, 2022

Hi All,

I am getting the "json.decoder.JSONDecodeError" when I am trying to fetch all jira users using the below python script.

Here is the code snippet:43.PNG

Here is the error snippet:

44.PNG

 

I tried to find the solution on the Atlassian Community as well as Stackoverflow. Couldn't find any possible solution.

Please provide me any possible solution to fix or tackle the error.

NOTE: We are using JIRA datacenter and I got the code from the following link: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-users-search-get

Thanks in advance!

Shreesh Narayan Singh

(JIRA System Administartor)

1 answer

0 votes
Prince Nyeche
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.
September 7, 2022

Your JSON object returned "None" hence that error. When that happens, the JSON decoder can not parse NoneType objects. Probably you want to make sure that you're authenticated properly before running the user search. You can use /rest/api/2/myself to give a test and see the type of response your server returns

Suggest an answer

Log in or Sign up to answer