Hey all,
I've been sent a plugin written in python that fetches a list of issues and their related info from a sprint and saves them on a spreadsheet on a google drive account.
The credentials needed to connect to Jira are stored in a json file that looks like this:
[
{
"API": "JIRA",
"user": "my@mail",
"token": "myToken",
"uri": " https://*****.atlassian.net/rest/api/latest/issue/JP-1"
}
]
As the title states, whenever I try to run this plugin an exception gets raised:
raise JIRAError(jira.exceptions.JIRAError: JiraError HTTP 404 url: https://*****.atlassian.net/rest/api/latest/issue/JP-1/rest/api/2/serverInfo
text: null for uri: https://*****.atlassian.net/rest/api/latest/issue/JP-1/rest/api/2/serverInfo
How do I prevent "rest/api/2/serverInfo" from being appended to the url string?
The plugin works on other people's computers, so it's not an issue with the code itself.
Many thanks in advance, and apologies for any mistake I may have made, I'm still new to Jira.
Welcome to Community! It's pretty difficult to troubleshoot a code when you do not know the exact lines of codes or what exactly is called first prior to the error and if there's nothing wrong with the code it should work but apparently that's not the case here.
So if i'm guessing here, I would say look for a baseurl within the code and change that to bear only your instance url or strip this uri in the json file to "uri": " https://*****.atlassian.net" and see what the script does.
Hey there, thanks for the welcome!
I totally forgot to mention that I'm not allowed to share the code, that's why it wasn't included in my post.
I also tried different strings, but they would always get "/rest/api/2/serverInfo" appended at the end.
Lastly, "uri": " https://*****.atlassian.net" raises a different error:
TypeError: 'NoneType' object is not subscriptable
By looking at the code I'd say this happens because there are no issues to be found there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since it's an internal script, probably you can reach out to the creator. I don't particularly use the atlassian-python-api that often. However if I can see the structure, I can troubleshoot why it fails. If your hunch is right probably you can try with a different issue that you know exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.