ImportError: cannot import name le_util

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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
Many domains.

I ran this command:
/usr/bin/letsencrypt renew --agree-tos

It produced this output:
An unexpected error occurred:
ImportError: cannot import name le_util
Please see the logfile ‘/tmp/tmpo3GwVV’ for more details.
root@host1:~# cat /tmp/tmpo3GwVV
2020-01-20 09:08:08,431:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File “/usr/bin/letsencrypt”, line 9, in
load_entry_point(‘certbot==0.27.0’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python2.7/dist-packages/certbot/main.py”, line 1338, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File “/usr/lib/python2.7/dist-packages/certbot/plugins/disco.py”, line 206, in find_all
plugin_ep = PluginEntryPoint(entry_point)
File “/usr/lib/python2.7/dist-packages/certbot/plugins/disco.py”, line 52, in init
self.plugin_cls = entry_point.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_apache/configurator.py”, line 18, in
from letsencrypt import le_util
ImportError: cannot import name le_util
2020-01-20 09:08:08,431:ERROR:certbot.log:An unexpected error occurred:

My web server is (include version):
root@host1:~# apache2ctl -V
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2019-09-16T13:13:53
Server’s Module Magic Number: 20120211:52
Server loaded: APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)

The operating system my web server runs on is (include version):
NAME=“Ubuntu”
VERSION=“16.04.4 LTS (Xenial Xerus)”

My hosting provider, if applicable, is:
None

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
root@host1:~# certbot --version
An unexpected error occurred:
ImportError: cannot import name le_util
Please see the logfile ‘/tmp/tmp49rqXU’ for more details.

Can you run apt update and apt list --upgradeable or apt full-upgrade? Is everything up-to-date?

I think you have version 0.4.0 of the apache plugin installed, instead of version 0.23.0.

I dont use the apache plugin, i just added the ssl files my self after creating.

apache2/xenial-updates 2.4.18-2ubuntu3.14 amd64 [upgradable from: 2.4.18-2ubuntu3.13]
apache2-bin/xenial-updates 2.4.18-2ubuntu3.14 amd64 [upgradable from: 2.4.18-2ubuntu3.13]
apache2-data/xenial-updates,xenial-updates 2.4.18-2ubuntu3.14 all [upgradable from: 2.4.18-2ubuntu3.13]
apache2-utils/xenial-updates 2.4.18-2ubuntu3.14 amd64 [upgradable from: 2.4.18-2ubuntu3.13]
apt/xenial-updates 1.2.32 amd64 [upgradable from: 1.2.29ubuntu0.1]
apt-transport-https/xenial-updates 1.2.32 amd64 [upgradable from: 1.2.29ubuntu0.1]
apt-utils/xenial-updates 1.2.32 amd64 [upgradable from: 1.2.29ubuntu0.1]
base-files/xenial-updates 9.4ubuntu4.11 amd64 [upgradable from: 9.4ubuntu4.6]
bind9-host/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
bsdutils/xenial-updates 1:2.27.1-6ubuntu3.9 amd64 [upgradable from: 1:2.27.1-6ubuntu3.4]
btrfs-tools/xenial-updates 4.4-1ubuntu1.1 amd64 [upgradable from: 4.4-1ubuntu1]
ca-certificates/xenial-updates,xenial-updates 20170717~16.04.2 all [upgradable from: 20170717~16.04.1]
cloud-initramfs-copymods/xenial-updates,xenial-updates 0.27ubuntu1.6 all [upgradable from: 0.27ubuntu1.5]
cloud-initramfs-dyn-netconf/xenial-updates,xenial-updates 0.27ubuntu1.6 all [upgradable from: 0.27ubuntu1.5]
console-setup/xenial-updates,xenial-updates 1.108ubuntu15.5 all [upgradable from: 1.108ubuntu15.4]
console-setup-linux/xenial-updates,xenial-updates 1.108ubuntu15.5 all [upgradable from: 1.108ubuntu15.4]
dbus/xenial-updates 1.10.6-1ubuntu3.5 amd64 [upgradable from: 1.10.6-1ubuntu3.4]
debconf/xenial-updates,xenial-updates 1.5.58ubuntu2 all [upgradable from: 1.5.58ubuntu1]
debconf-i18n/xenial-updates,xenial-updates 1.5.58ubuntu2 all [upgradable from: 1.5.58ubuntu1]
dnsutils/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
dpkg/xenial-updates 1.18.4ubuntu1.6 amd64 [upgradable from: 1.18.4ubuntu1.4]
friendly-recovery/xenial-updates,xenial-updates 0.2.31ubuntu2.1 all [upgradable from: 0.2.31ubuntu1]
grub-common/xenial-updates 2.02~beta2-36ubuntu3.23 amd64 [upgradable from: 2.02~beta2-36ubuntu3.18]
grub-legacy-ec2/xenial-updates,xenial-updates 19.3-41-gc4735dd3-0ubuntu1~16.04.1 all [upgradable from: 18.2-4-g05926e48-0ubuntu1~16.04.2]
grub-pc/xenial-updates 2.02~beta2-36ubuntu3.23 amd64 [upgradable from: 2.02~beta2-36ubuntu3.18]
grub-pc-bin/xenial-updates 2.02~beta2-36ubuntu3.23 amd64 [upgradable from: 2.02~beta2-36ubuntu3.18]
grub2-common/xenial-updates 2.02~beta2-36ubuntu3.23 amd64 [upgradable from: 2.02~beta2-36ubuntu3.18]
initramfs-tools/xenial-updates,xenial-updates 0.122ubuntu8.16 all [upgradable from: 0.122ubuntu8.14]
initramfs-tools-bin/xenial-updates 0.122ubuntu8.16 amd64 [upgradable from: 0.122ubuntu8.14]
initramfs-tools-core/xenial-updates,xenial-updates 0.122ubuntu8.16 all [upgradable from: 0.122ubuntu8.14]
iproute2/xenial-updates 4.3.0-1ubuntu3.16.04.5 amd64 [upgradable from: 4.3.0-1ubuntu3.16.04.3]
keyboard-configuration/xenial-updates,xenial-updates 1.108ubuntu15.5 all [upgradable from: 1.108ubuntu15.4]
kmod/xenial-updates 22-1ubuntu5.2 amd64 [upgradable from: 22-1ubuntu5]
libapt-inst2.0/xenial-updates 1.2.32 amd64 [upgradable from: 1.2.29ubuntu0.1]
libapt-pkg5.0/xenial-updates 1.2.32 amd64 [upgradable from: 1.2.29ubuntu0.1]
libbind9-140/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libblkid1/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
libc-bin/xenial-updates 2.23-0ubuntu11 amd64 [upgradable from: 2.23-0ubuntu10]
libc-dev-bin/xenial-updates 2.23-0ubuntu11 amd64 [upgradable from: 2.23-0ubuntu10]
libc6/xenial-updates 2.23-0ubuntu11 amd64 [upgradable from: 2.23-0ubuntu10]
libc6-dev/xenial-updates 2.23-0ubuntu11 amd64 [upgradable from: 2.23-0ubuntu10]
libdbus-1-3/xenial-updates 1.10.6-1ubuntu3.5 amd64 [upgradable from: 1.10.6-1ubuntu3.4]
libdns-export162/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libdns162/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libdrm-common/xenial-updates,xenial-updates 2.4.91-2~16.04.1 all [upgradable from: 2.4.83-1~16.04.1]
libdrm2/xenial-updates 2.4.91-2~16.04.1 amd64 [upgradable from: 2.4.83-1~16.04.1]
libfdisk1/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
libisc-export160/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libisc160/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libisccc140/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libisccfg140/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
libkmod2/xenial-updates 22-1ubuntu5.2 amd64 [upgradable from: 22-1ubuntu5]
libldap-2.4-2/xenial-updates 2.4.42+dfsg-2ubuntu3.7 amd64 [upgradable from: 2.4.42+dfsg-2ubuntu3.6]
liblwres141/xenial-updates 1:9.10.3.dfsg.P4-8ubuntu1.15 amd64 [upgradable from: 1:9.10.3.dfsg.P4-8ubuntu1.14]
liblxc1/xenial-updates 2.0.11-0ubuntu1~16.04.3 amd64 [upgradable from: 2.0.8-0ubuntu1~16.04.2]
libmount1/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
libpam-systemd/xenial-updates 229-4ubuntu21.23 amd64 [upgradable from: 229-4ubuntu21.21]
libpci3/xenial-updates 1:3.3.1-1.1ubuntu1.3 amd64 [upgradable from: 1:3.3.1-1.1ubuntu1.2]
libsasl2-2/xenial-updates 2.1.26.dfsg1-14ubuntu0.1 amd64 [upgradable from: 2.1.26.dfsg1-14build1]
libsasl2-modules/xenial-updates 2.1.26.dfsg1-14ubuntu0.1 amd64 [upgradable from: 2.1.26.dfsg1-14build1]
libsasl2-modules-db/xenial-updates 2.1.26.dfsg1-14ubuntu0.1 amd64 [upgradable from: 2.1.26.dfsg1-14build1]
libslang2/xenial-updates 2.3.0-2ubuntu1.1 amd64 [upgradable from: 2.3.0-2ubuntu1]
libsmartcols1/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
libsnmp-base/xenial-updates,xenial-updates 5.7.3+dfsg-1ubuntu4.4 all [upgradable from: 5.7.3+dfsg-1ubuntu4.2]
libsnmp30/xenial-updates 5.7.3+dfsg-1ubuntu4.4 amd64 [upgradable from: 5.7.3+dfsg-1ubuntu4.2]
libsystemd0/xenial-updates 229-4ubuntu21.23 amd64 [upgradable from: 229-4ubuntu21.21]
libudev1/xenial-updates 229-4ubuntu21.23 amd64 [upgradable from: 229-4ubuntu21.21]
libuuid1/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
locales/xenial-updates,xenial-updates 2.23-0ubuntu11 all [upgradable from: 2.23-0ubuntu10]
login/xenial-updates 1:4.2-3.1ubuntu5.4 amd64 [upgradable from: 1:4.2-3.1ubuntu5.3]
lshw/xenial-updates 02.17-1.1ubuntu3.6 amd64 [upgradable from: 02.17-1.1ubuntu3.5]
lxc-common/xenial-updates 2.0.11-0ubuntu1~16.04.3 amd64 [upgradable from: 2.0.8-0ubuntu1~16.04.2]
mount/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
multiarch-support/xenial-updates 2.23-0ubuntu11 amd64 [upgradable from: 2.23-0ubuntu10]
nfs-common/xenial-updates 1:1.2.8-9ubuntu12.2 amd64 [upgradable from: 1:1.2.8-9ubuntu12.1]
nfs-kernel-server/xenial-updates 1:1.2.8-9ubuntu12.2 amd64 [upgradable from: 1:1.2.8-9ubuntu12.1]
open-iscsi/xenial-updates 2.0.873+git0.3b4b4500-14ubuntu3.7 amd64 [upgradable from: 2.0.873+git0.3b4b4500-14ubuntu3.4]
open-vm-tools/xenial-updates 2:10.2.0-3~ubuntu0.16.04.1 amd64 [upgradable from: 2:10.0.7-3227872-5ubuntu1~16.04.2]
opsview-agent/stable 5.4.2.182361246-1trusty1 amd64 [upgradable from: 5.4.1.172541017-1trusty1]
overlayroot/xenial-updates,xenial-updates 0.27ubuntu1.6 all [upgradable from: 0.27ubuntu1.5]
passwd/xenial-updates 1:4.2-3.1ubuntu5.4 amd64 [upgradable from: 1:4.2-3.1ubuntu5.3]
pciutils/xenial-updates 1:3.3.1-1.1ubuntu1.3 amd64 [upgradable from: 1:3.3.1-1.1ubuntu1.2]
psmisc/xenial-updates 22.21-2.1ubuntu0.1 amd64 [upgradable from: 22.21-2.1build1]
python-apt-common/xenial-updates,xenial-updates 1.1.0~beta1ubuntu0.16.04.5 all [upgradable from: 1.1.0~beta1ubuntu0.16.04.1]
python-letsencrypt-apache/xenial-updates,xenial-updates 0.7.0-0ubuntu0.16.04.1 all [upgradable from: 0.4.1-1]
python3-apt/xenial-updates 1.1.0~beta1ubuntu0.16.04.5 amd64 [upgradable from: 1.1.0~beta1ubuntu0.16.04.1]
python3-distupgrade/xenial-updates,xenial-updates 1:16.04.29 all [upgradable from: 1:16.04.25]
python3-software-properties/xenial-updates,xenial-updates 0.96.20.9 all [upgradable from: 0.96.20.7]
python3-update-manager/xenial-updates,xenial-updates 1:16.04.17 all [upgradable from: 1:16.04.13]
resolvconf/xenial-updates,xenial-updates 1.78ubuntu7 all [upgradable from: 1.78ubuntu6]
rsyslog/xenial-updates 8.16.0-1ubuntu3.1 amd64 [upgradable from: 8.16.0-1ubuntu3]
shared-mime-info/xenial-updates 1.5-2ubuntu0.2 amd64 [upgradable from: 1.5-2ubuntu0.1]
snapd/xenial-updates 2.40 amd64 [upgradable from: 2.37.4ubuntu0.1]
snmp/xenial-updates 5.7.3+dfsg-1ubuntu4.4 amd64 [upgradable from: 5.7.3+dfsg-1ubuntu4.2]
software-properties-common/xenial-updates,xenial-updates 0.96.20.9 all [upgradable from: 0.96.20.7]
sosreport/xenial-updates 3.6-1ubuntu0.16.04.4 amd64 [upgradable from: 3.5-1~ubuntu16.04.3]
squashfs-tools/xenial-updates 1:4.3-3ubuntu2.16.04.3 amd64 [upgradable from: 1:4.3-3ubuntu2.16.04.1]
systemd/xenial-updates 229-4ubuntu21.23 amd64 [upgradable from: 229-4ubuntu21.21]
systemd-sysv/xenial-updates 229-4ubuntu21.23 amd64 [upgradable from: 229-4ubuntu21.21]
ubuntu-core-launcher/xenial-updates 2.40 amd64 [upgradable from: 2.37.4ubuntu0.1]
ubuntu-minimal/xenial-updates 1.361.4 amd64 [upgradable from: 1.361.1]
ubuntu-release-upgrader-core/xenial-updates,xenial-updates 1:16.04.29 all [upgradable from: 1:16.04.25]
ubuntu-server/xenial-updates 1.361.4 amd64 [upgradable from: 1.361.1]
ubuntu-standard/xenial-updates 1.361.4 amd64 [upgradable from: 1.361.1]
udev/xenial-updates 229-4ubuntu21.23 amd64 [upgradable from: 229-4ubuntu21.21]
uidmap/xenial-updates 1:4.2-3.1ubuntu5.4 amd64 [upgradable from: 1:4.2-3.1ubuntu5.3]
unattended-upgrades/xenial-updates,xenial-updates 1.1ubuntu1.18.04.7~16.04.5 all [upgradable from: 0.90ubuntu0.10]
update-manager-core/xenial-updates,xenial-updates 1:16.04.17 all [upgradable from: 1:16.04.13]
update-notifier-common/xenial-updates,xenial-updates 3.168.10 all [upgradable from: 3.168.8]
ureadahead/xenial-updates 0.100.0-19.1 amd64 [upgradable from: 0.100.0-19]
util-linux/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
uuid-runtime/xenial-updates 2.27.1-6ubuntu3.9 amd64 [upgradable from: 2.27.1-6ubuntu3.4]
veeam-release-deb/stable 1.0.7 amd64 [upgradable from: 1.0.5]

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