teracyhq / httpie-jwt-auth

JWTAuth (JSON Web Tokens) auth plugin for HTTPie
BSD 3-Clause "New" or "Revised" License
172 stars 12 forks source link

HTTPie 2.0.0 ImportError: cannot import name 'ExitStatus' #32

Closed MarioHmura closed 4 years ago

MarioHmura commented 4 years ago

Executing with HTTPie v2.0.0 with Python 3.6 e.g.: http -v -b --output C:\Directory\JSON_Reply.json --auth-type=jwt --auth="adf21214fds254125" POST http://web_address.com.au/api @C:\Directory\JSON.json

Error:

File....\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
File....\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
File....\Python36\Scripts\http.exe\__main__.py", line 7, in <module>
File....\python36\lib\site-packages\httpie\__main__.py", line 11, in main
    exit_status = main()
File....\python36\lib\site-packages\httpie\core.py", line 36, in main
    plugin_manager.load_installed_plugins()
File....\python36\lib\site-packages\httpie\plugins\manager.py", line 34, in load_installed_plugins
    plugin = entry_point.load()
File....\python36\lib\site-packages\pkg_resources\__init__.py", line 2444, in load
    return self.resolve()
File....\python36\lib\site-packages\pkg_resources\__init__.py", line 2450, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
File....\python36\lib\site-packages\httpie_aws_auth.py", line 8, in <module>
    from httpie import ExitStatus
ImportError: cannot import name 'ExitStatus'

No issues with HTTPie v1.0.3

datphan commented 4 years ago

@MarioHmura I can not reproduced this error, are you using the correct plugin? it is httpie-jwt-auth and not httpie_aws_auth. image

MarioHmura commented 4 years ago

I’ve noticed the ‘httpie_aws_auth‘ plug-in, but it is definitely the ‘httpie-jwt-auth’. I do have both installed though.

MarioHmura commented 4 years ago

Uninstalling the httpie-aws-auth plugin solved the problem.