LetsEncrypt AttributeError: 'module' object has no attribute 'RecoveryContact'


#1

I ran this command: sudo letsencrypt --apache

It produced this output:
Traceback (most recent call last):
File “/usr/bin/letsencrypt”, line 9, in
load_entry_point(‘letsencrypt==0.4.1’, ‘console_scripts’, ‘letsencrypt’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2569, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2229, in load
return self.resolve()
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2235, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python2.7/dist-packages/letsencrypt/cli.py”, line 34, in
from letsencrypt import client
File “/usr/lib/python2.7/dist-packages/letsencrypt/client.py”, line 17, in
from letsencrypt import auth_handler
File “/usr/lib/python2.7/dist-packages/letsencrypt/auth_handler.py”, line 11, in
from letsencrypt import achallenges
File “/usr/lib/python2.7/dist-packages/letsencrypt/achallenges.py”, line 64, in
class RecoveryContact(AnnotatedChallenge):
File “/usr/lib/python2.7/dist-packages/letsencrypt/achallenges.py”, line 67, in RecoveryContact
acme_type = challenges.RecoveryContact
AttributeError: ‘module’ object has no attribute ‘RecoveryContact’

My operating system is (include version): Ubuntu 16.04 (xenial)

My web server is (include version): Apache/2.4.18

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

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


#2

hi @galimybe

looks like the code is missing some classes

how did you build the certbot client?

Andrei


#3

Made everything according the manual:
sudo apt-get install python-letsencrypt-apache

tried to uninstall and reinstall few times, tried to update python version, no luck…

there was a similar question without the answer: Can´t run letsencrypt as chron Job

as I understood this bug happens not so often, do not worry about that, I installed the GetSSL script.
Thank You for care and answer.

Regards
Sigitas


#4

I get this same error.

Using Ubuntu 16.04 (up to date) and I have installed letsencrypt using the proper instructions on certbot website.


#5

This would happen if you have a new version of ACME installed with the version of letsencrypt available in Ubuntu’s repos. Have you pip installed letsencrypt or certbot before? What’s the output of:

python -c 'from acme import challenges; print challenges.__file__; print challenges.RecoveryContact'

#6

Hi I get this :

techmo2@spectre:~$ python -c 'from acme import challenges; print challenges.__file__; print challenges.RecoveryContact'
/usr/local/lib/python2.7/dist-packages/acme/challenges.pyc
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'RecoveryContact'

I think i did use pip to install certbot. Is that a problem ?


#7

If You start reading all documentation, in https://certbot.eff.org/docs/install.html#alternate-installation-methods You will find warning:

“Please do not use python setup.py install or python pip install … Please do not attempt the installation commands as superuser/root and/or without virtual environment, e.g. sudo python setup.py install, sudo pip install, sudo ./venv/bin/… These modes of operation might corrupt your operating system and are not supported by the Certbot team!”

I found this after some time after searching how to solve the problem and I think that pip made the error.


#8

damn … So does this mean I am screwed :frowning:


#9

I have made the same way, the same mistake… 3 days found no answer and installed other script. Maybe some day this conflict with pip will be solved.


#10

I already have active certificates on the same server. If I use some other script, do I have to delete all of them and then recreate certificates ?

Can you suggest an alternative script ? Which one you ended up using ?


#11

I had certificates from https://www.startssl.com/, but "Mozilla and Google decided to distrust all StartCom root certificates as of 21st of October, this situation will have an impact in the upcoming release of Firefox and Chrome in January."
Letsencrypt is alternative. After problems with CertBot, I tried first in a row proposed client GetSSL (https://github.com/srvrco/getssl). Maybe not so convenient but simple enough. It creates new certificates and allows to automate updating later. And this works for me.


#12

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