Infomaniak / certbot-dns-infomaniak

Infomaniak DNS Authenticator plugin for certbot
Apache License 2.0
32 stars 13 forks source link

AttributeError: module 'certbot.plugins.common' has no attribute 'TLSSNI01' #6

Closed timotheeandres closed 3 years ago

timotheeandres commented 3 years ago

Hello, First of all, thank you for taking the time to create this :) I stumbled upon it randomly while trying to see if someone created it only a few hours after you created the repo.

Now, I am using v0.1.7, but when I follow your instructions, I get the following error (I of course used my own address instead of death.star):

> sudo certbot certonly --authenticator certbot-dns-infomaniak:dns-infomaniak --server https://acme-staging-v02.api.letsencrypt.org/directory --agree-tos --rsa-key-size 4096 -d 'death.star'
An unexpected error occurred:
AttributeError: module 'certbot.plugins.common' has no attribute 'TLSSNI01'

The log file explaining the error contains:

2021-01-11 19:32:19,204:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/certbot/main.py", line 15, in main
    return internal_main.main(cli_args)
  File "/usr/local/lib/python3.8/dist-packages/certbot/_internal/main.py", line 1383, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/local/lib/python3.8/dist-packages/certbot/_internal/plugins/disco.py", line 236, in find_all
    plugin_ep = cls._load_entry_point(entry_point, plugins, with_prefix=False)
  File "/usr/local/lib/python3.8/dist-packages/certbot/_internal/plugins/disco.py", line 254, in _load_entry_point
    plugin_ep = PluginEntryPoint(entry_point, with_prefix)
  File "/usr/local/lib/python3.8/dist-packages/certbot/_internal/plugins/disco.py", line 56, in __init__
    self.plugin_cls = entry_point.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/certbot_apache/entrypoint.py", line 8, in <module>
    from certbot_apache import configurator
  File "/usr/lib/python3/dist-packages/certbot_apache/configurator.py", line 35, in <module>
    from certbot_apache import http_01
  File "/usr/lib/python3/dist-packages/certbot_apache/http_01.py", line 17, in <module>
    class ApacheHttp01(common.TLSSNI01):
AttributeError: module 'certbot.plugins.common' has no attribute 'TLSSNI01'
2021-01-11 19:32:19,204:ERROR:certbot._internal.log:An unexpected error occurred:
2021-01-11 19:32:19,205:ERROR:certbot._internal.log:AttributeError: module 'certbot.plugins.common' has no attribute 'TLSSNI01'

From what I have found online, it might come from the fact that I have certbot and python3-certbot-apache installed both from apt and from the dependencies of your code. Could that be the case?

Here is what I have installed from pip3:

and from apt:

I am running Ubuntu 20.04.1.

reneluria commented 3 years ago

Hello and thank you for your report, the new version fixes this issue: the requirement on certbot version was too high, and made pip install cerbot on top of the distribution installation causing unwanted behaviour.

reneluria commented 3 years ago

Also you should now deinstall the deps installed via pip before upgrading