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

ImportError: cannot import name 'create_auth_header' from 'asymmetric_jwt_auth' #30

Open
NilanjPatel opened this issue Aug 7, 2022 · 1 comment

Comments

@NilanjPatel
Copy link

ImportError: cannot import name 'create_auth_header' from 'asymmetric_jwt_auth' (/home/nilanj/.local/lib/python3.10/site-packages/asymmetric_jwt_auth/init.py)

Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/certbot/main.py", line 19, in main
    return internal_main.main(cli_args)
  File "/usr/local/lib/python3.10/dist-packages/certbot/_internal/main.py", line 1705, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/local/lib/python3.10/dist-packages/certbot/_internal/plugins/disco.py", line 241, in find_all
    plugin_ep = cls._load_entry_point(entry_point, plugins, with_prefix=False)
  File "/usr/local/lib/python3.10/dist-packages/certbot/_internal/plugins/disco.py", line 261, in _load_entry_point
    plugin_ep = PluginEntryPoint(entry_point, with_prefix)
  File "/usr/local/lib/python3.10/dist-packages/certbot/_internal/plugins/disco.py", line 60, in __init__
    self.plugin_cls: Type[interfaces.Plugin] = entry_point.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2465, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2471, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/nilanj/.local/lib/python3.10/site-packages/certbot_django/coordinator/authenticator.py", line 2, in <module>
    from asymmetric_jwt_auth import create_auth_header, generate_key_pair
ImportError: cannot import name 'create_auth_header' from 'asymmetric_jwt_auth' (/home/nilanj/.local/lib/python3.10/site-packages/asymmetric_jwt_auth/__init__.py)

2022-08-07 16:04:57,020:ERROR:certbot._internal.log:An unexpected error occurred:
2022-08-07 16:04:57,020:ERROR:certbot._internal.log:ImportError: cannot import name 'create_auth_header' from 'asymmetric_jwt_auth' (/home/nilanj/.local/lib/python3.10/site-packages/asymme>

after this i also tried to import generate_key_pairand in this case also I get the error
ImportError: cannot import name 'generate_key_pair' from 'asymmetric_jwt_auth' (/home/nilanj/.local/lib/python3.10/site-packages/asymmetric_jwt_auth/__init__.py)

@jneuendorf
Copy link

This function does no longer exists as of version 1.0.0. Downgrading to 0.5 should work.

Otherwise, there is now Token. create_auth_header but I am not sure, if it works the same way.

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

2 participants