AttributeError: module 'acme.challenges' has no attribute 'TLSSNI01'

EDIT: i solve this by removing the package installed with apt: sudo apt remove python3-certbot-nginx and installing with pip: sudo pip3 install certbot-nginx

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
sudo certbot --nginx

It produced this output:
Obtaining a new certificate
Performing the following challenges:
An unexpected error occurred:
AttributeError: module ‘acme.challenges’ has no attribute ‘TLSSNI01’
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version):
nginx version: nginx/1.17.10 (Ubuntu)

The operating system my web server runs on is (include version):
Ubuntu 20.04 LTS x86_64

My hosting provider, if applicable, is:
AWS ec2

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
certbot 0.40.0

the end of log file:

    2020-05-10 00:52:21,429:DEBUG:urllib3.connectionpool: "POST /acme/authz-v3/4481359547 HTTP/1.1" 200 801
2020-05-10 00:52:21,429:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Sun, 10 May 2020 00:52:21 GMT
Content-Type: application/json
Content-Length: 801
Connection: keep-alive
Boulder-Requester: 85727446
Cache-Control: public, max-age=0, no-cache
Link: <>;rel="index"
Replay-Nonce: 0101gyM0kUDUck74wQs8Xeov2rKa17A6kH2YQ4KrjKoHUQU
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800

"identifier": {
"type": "dns",
"value": ""
"status": "pending",
"expires": "2020-05-17T00:43:58Z",
"challenges": [
"type": "http-01",
"status": "pending",
"url": "",
"token": "z9BN_TAI63Qf_mUGPhejTFPHhO-dZiPMRXE7pN0qkCs"
"type": "dns-01",
"status": "pending",
"url": "",
"token": "z9BN_TAI63Qf_mUGPhejTFPHhO-dZiPMRXE7pN0qkCs"
"type": "tls-alpn-01",
"status": "pending",
"url": "",
"token": "z9BN_TAI63Qf_mUGPhejTFPHhO-dZiPMRXE7pN0qkCs"
2020-05-10 00:52:21,429:DEBUG:acme.client:Storing nonce: 0101gyM0kUDUck74wQs8Xeov2rKa17A6kH2YQ4KrjKoHUQU
2020-05-10 00:52:21,430:INFO:certbot.auth_handler:Performing the following challenges:
2020-05-10 00:52:21,430:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in <module>
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/", line 1132, in run
new_lineage = _get_and_save_cert(le_client, config, domains,
File "/usr/lib/python3/dist-packages/certbot/", line 121, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File "/usr/lib/python3/dist-packages/certbot/", line 417, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File "/usr/lib/python3/dist-packages/certbot/", line 348, in obtain_certificate
orderr = self._get_order_and_authorizations(, self.config.allow_subset_of_names)
File "/usr/lib/python3/dist-packages/certbot/", line 396, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File "/usr/lib/python3/dist-packages/certbot/", line 62, in handle_authorizations
achalls = self._choose_challenges(authzrs)
File "/usr/lib/python3/dist-packages/certbot/", line 206, in _choose_challenges
File "/usr/lib/python3/dist-packages/certbot/", line 221, in _get_chall_pref
plugin_pref = self.auth.get_chall_pref(domain)
File "/usr/lib/python3/dist-packages/certbot_nginx/", line 1110, in get_chall_pref
return [challenges.HTTP01, challenges.TLSSNI01]
AttributeError: module 'acme.challenges' has no attribute 'TLSSNI01'
2020-05-10 00:52:21,431:ERROR:certbot.log:An unexpected error occurred:
1 Like

Ubuntu 20.04 currently has incompatible versions of the python3-certbot-nginx and python3-acme packages.

There’s a bug open and they’re working on fixing it.

Your solution worked for now, but in the long term, mixing pip and apt packages isn’t recommended. As they get updated in the future, it might create new compatibility problems!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.