rominf / jira-oauth

Python library for Jira OAuth
Apache License 2.0
8 stars 6 forks source link

Invalid syntax when running jira-oatuh command #3

Open oshaley opened 5 years ago

oshaley commented 5 years ago

When I ran jira-oauth, I faced error bellow.

$ jira-oauth
Traceback (most recent call last):
  File "/Users/oshale/.pyenv/versions/3.7.4/bin/jira-oauth", line 6, in <module>
    from jira_oauth.console import main
  File "/Users/oshale/.pyenv/versions/3.7.4/lib/python3.7/site-packages/jira_oauth/__init__.py", line 11, in <module>
    from tlslite.utils import keyfactory
  File "/Users/oshale/.pyenv/versions/3.7.4/lib/python3.7/site-packages/tlslite/__init__.py", line 27, in <module>
    from tlslite.api import *
  File "/Users/oshale/.pyenv/versions/3.7.4/lib/python3.7/site-packages/tlslite/api.py", line 11, in <module>
    from .tlsconnection import TLSConnection
  File "/Users/oshale/.pyenv/versions/3.7.4/lib/python3.7/site-packages/tlslite/tlsconnection.py", line 71
    async=False):
              ^

Here is the config

$ cat ~/.oauthconfig/oauth.config
[oauth_config]
jira_url=https://********.atlassian.net
consumer_key=jira-oauth1-rest-api-access
test_jira_issue=IDEV-1

Is there any workaround?

rominf commented 5 years ago

If you look closely at the traceback, you will find, that the problem is in the tlslite-ng, not this project. As a workaround, you can run it with Python 3.6. Also, you can try to update to the latest version of tlslite-ng, fix the code in jira-oauth, and submit PR.