Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception #78

Open
jbech-linaro opened this issue Dec 11, 2023 · 3 comments
Open

Exception #78

jbech-linaro opened this issue Dec 11, 2023 · 3 comments

Comments

@jbech-linaro
Copy link
Collaborator

We get an exception like this when running Jipdate as follows. It's been seen by two different users (Viresh and myself). I have logged in/out and I created a brand new token, but issue still persists.

$ ./jipdate.py -q --all
Traceback (most recent call last):
  File "/home/jyx/devel/jipdate/./jipdate.py", line 543, in <module>
    main(sys.argv)
  File "/home/jyx/devel/jipdate/./jipdate.py", line 540, in main
    parse_status_file(jira, filename, issues)
  File "/home/jyx/devel/jipdate/./jipdate.py", line 290, in parse_status_file
    resolution_map = dict([(t.name.title(), t.id) for t in jira.resolutions()])
  File "/home/jyx/devel/pip-envs/jipdate/lib/python3.10/site-packages/jira/client.py", line 3003, in resolutions
    r_json = self._get_json("resolution")
  File "/home/jyx/devel/pip-envs/jipdate/lib/python3.10/site-packages/jira/client.py", line 3853, in _get_json
    r = self._session.get(url, params=params)
  File "/home/jyx/devel/pip-envs/jipdate/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/home/jyx/devel/pip-envs/jipdate/lib/python3.10/site-packages/jira/resilientsession.py", line 246, in request
    elif raise_on_error(response, **processed_kwargs):
  File "/home/jyx/devel/pip-envs/jipdate/lib/python3.10/site-packages/jira/resilientsession.py", line 71, in raise_on_error
    raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 406 url: https://linaro.atlassian.net/rest/api/2/resolution

+ response header
@roxell
Copy link
Collaborator

roxell commented Dec 14, 2023

Thank you for creating the issue.
#79 should fix this issue.
I saw it as well but 3 days after =)

@vireshk
Copy link
Contributor

vireshk commented Dec 15, 2023

@roxell The issue is still not fixed sadly with #79 .

Earlier I ran jipdate and closed the editor window without any changes and it didn't crash. But today when I tried to edit the file and close, I got:

Server to update: https://linaro.atlassian.net

Are you sure you want to update Jira with the information above? [y/n] y
Traceback (most recent call last):
  File "/home/vireshk/.local/bin/jipdate", line 8, in <module>
    sys.exit(main())
  File "/home/vireshk/.local/lib/python3.8/site-packages/jipdate/jipdate.py", line 660, in main
    parse_status_file(jira, filename, issues)
  File "/home/vireshk/.local/lib/python3.8/site-packages/jipdate/jipdate.py", line 520, in parse_status_file
    update_jira(jira, issue, comment, transition, timespent)
  File "/home/vireshk/.local/lib/python3.8/site-packages/jipdate/jipdate.py", line 229, in update_jira
    jira.add_comment(i, c)
  File "/home/vireshk/.local/lib/python3.8/site-packages/jira/client.py", line 126, in wrapper
    result = func(*arg_list, **kwargs)
  File "/home/vireshk/.local/lib/python3.8/site-packages/jira/client.py", line 1366, in add_comment
    r = self._session.post(
  File "/home/vireshk/.local/lib/python3.8/site-packages/jira/resilientsession.py", line 154, in post
    return self.__verb('POST', url, **kwargs)
  File "/home/vireshk/.local/lib/python3.8/site-packages/jira/resilientsession.py", line 147, in __verb
    raise_on_error(response, verb=verb, **kwargs)
  File "/home/vireshk/.local/lib/python3.8/site-packages/jira/resilientsession.py", line 56, in raise_on_error
    raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 415 url: https://linaro.atlassian.net/rest/api/2/issue/UM-401/comment
	
	response headers = {'Date': 'Fri, 15 Dec 2023 11:25:21 GMT', 'Content-Type': 'text/html;charset=UTF-8', 'Server': 'AtlassianEdge', 'Timing-Allow-Origin': '*', 'X-Arequestid': '4760fe19a763395710a712df83d5a456', 'X-Aaccountid': '557058%3A648cea2f-619c-4d3c-9f15-4ad00d2b73cf', 'Cache-Control': 'no-cache, no-store, no-transform', 'X-Content-Type-Options': 'nosniff', 'X-Xss-Protection': '1; mode=block', 'Atl-Traceid': '8cb8e2fafdc54b1d93c8e939d0bb83c1', 'Report-To': '{"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}', 'Nel': '{"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'Transfer-Encoding': 'chunked'}
	response text = 

@vireshk
Copy link
Contributor

vireshk commented Dec 21, 2023

Moved at python 3.12 and it worked now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants