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

auth failure from stored creds results in "RecursionError: maximum recursion depth exceeded while calling a Python object" #140

Open
eweiman opened this issue Apr 7, 2021 · 0 comments

Comments

@eweiman
Copy link

eweiman commented Apr 7, 2021

Attempting to view or search for an issue from jira-cli results in a nearly 1000 line traceback ending with:
RecursionError: maximum recursion depth exceeded while calling a Python object

Apparently this was due to an old password in the stored credential file.

An auth failure should fail more gracefully and indicate why there's a failure vs a long traceback that on the surface means nothing.
I see no logical reason for an authentication failure to enter a recursion loop like this.

Here's a small excerpt of the traceback:

  File "/usr/local/bin/jira-cli", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/jiracli/interface.py", line 338, in cli
    protocol=post_args.protocol or config.protocol or 'rest'
  File "/usr/local/lib/python3.6/site-packages/jiracli/interface.py", line 108, in initialize
    jira.login(**auth_kwargs)
  File "/usr/local/lib/python3.6/site-packages/jiracli/bridge/rest.py", line 118, in login
    get_server_info=False, validate=False, **auth_kwargs
  File "/usr/local/lib/python3.6/site-packages/jira/client.py", line 462, in __init__
    user = self.session(auth)
  File "/usr/local/lib/python3.6/site-packages/jira/client.py", line 2446, in session
    r = self._session.post(url, data=json.dumps(authentication_data))
  File "/usr/local/lib/python3.6/site-packages/jira/resilientsession.py", line 154, in post
    return self.__verb('POST', url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/jira/resilientsession.py", line 125, in __verb
    response = method(url, timeout=self.timeout, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 522, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 602, in send
    r = dispatch_hook('response', hooks, r, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/hooks.py", line 31, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/jira/client.py", line 208, in handle_401
    self.init_session()
  File "/usr/local/lib/python3.6/site-packages/jira/client.py", line 224, in init_session
    self.start_session()
  File "/usr/local/lib/python3.6/site-packages/jira/client.py", line 238, in start_session
    self._get_session(self.__auth)
  File "/usr/local/lib/python3.6/site-packages/jira/client.py", line 2446, in session
    r = self._session.post(url, data=json.dumps(authentication_data))
  File "/usr/local/lib/python3.6/site-packages/jira/resilientsession.py", line 154, in post
    return self.__verb('POST', url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/jira/resilientsession.py", line 125, in __verb
    response = method(url, timeout=self.timeout, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 522, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 602, in send
    r = dispatch_hook('response', hooks, r, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/hooks.py", line 31, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
<<< output trimmed from issue >>>
  File "/usr/lib64/python3.6/_collections_abc.py", line 839, in update
    if isinstance(other, Mapping):
  File "/usr/lib64/python3.6/abc.py", line 184, in __instancecheck__
    if subclass in cls._abc_cache:
RecursionError: maximum recursion depth exceeded while calling a Python object
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

1 participant