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

PAT Token method leads to TypeError: __init__() got an unexpected keyword argument 'token_auth' #1337

Closed
2 of 4 tasks
krwester opened this issue Mar 24, 2022 · 3 comments
Closed
2 of 4 tasks

Comments

@krwester
Copy link

Bug summary

Description: PAT Token method leads to TypeError: __init__() got an unexpected keyword argument 'token_auth'

Python Interpreter: Python 3.8
jira-python: V 3.11
OS: Windows 10

Other Dependencies: JIRA Server 8.22.0#822000-sha1:cef2cc4

Steps To Reproduce:

  1. Setup personal token via JIRA interface
  2. Save token to variable "jira_token"
  3. Try to authenticate using jira = JIRA(options=options, token_auth = jira_token)
  4. Get error: TypeError: init() got an unexpected keyword argument 'token_auth'

Confirm token authentication works on server by using the Atlassian Api wrapper.

Basic authentication also works using username/password -- but that is not ideal.

Is there an existing issue for this?

  • I have searched the existing issues

Jira Instance type

Jira Server or Data Center (Self-hosted)

Jira instance version

8.22.0

jira-python version

main

Python Interpreter version

3.8

Which operating systems have you used?

  • Linux
  • macOS
  • Windows

Reproduction steps

Setup personal token via JIRA interface
2. Save token to variable "jira_token"
3. Try to authenticate using jira = JIRA(options=options, token_auth = jira_token)
4. Get error: TypeError: __init__() got an unexpected keyword argument 'token_auth'

Stack trace

I'm not sure how to provide that.

Expected behaviour

Authenticated jira object

Additional Context

Confirm token authentication works on server by using the Atlassian Api wrapper.

@wrmacrae
Copy link

This is happening for me, too, with v8.20.6 of Jira Server and 2.0 of the jira python module. Python 3.9.9 on a Mac.

>>> import inspect
>>> from jira import JIRA
>>> inspect.signature(JIRA.__init__)
<Signature (self, server=None, options=None, basic_auth=None, oauth=None, jwt=None, kerberos=False, kerberos_options=None, validate=False, get_server_info=True, async_=False, async_workers=5, logging=True, max_retries=3, proxies=None, timeout=None, auth=None)>

@wrmacrae
Copy link

Ah, it looks like this feature was added in 2021 (#991) and is in 3.1.0 and 3.1.1, but I was running 2.0. Maybe @krwester is having the same problem.

@krwester
Copy link
Author

I was running 3.1.1 and still had the issue. However, I upgraded to 3.2 and it works as expected. Resolved as far as I'm concerned.

@studioj studioj closed this as completed May 4, 2022
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