Crontab error execute


#1

Error: couldn’t get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
Traceback (most recent call last):
File “/opt/eff.org/certbot/venv/bin/letsencrypt”, line 7, in
from certbot.main import main
ImportError: No module named certbot.main

When I run the latest version of certbot-auto in crontab (root permission) , I get the above error. However, it works well with shell commands.

my environment is CentOS 6.8 in AWS EC2, nginx, I’ve also installed version 2.7 of python on ec2 server.
Can I get help with the issue?


#2

I’m seeing a similar issue on Ubuntu 18.04.
Certbot works but Certbot-auto fails with same error message.
Tried updating system without any success.

I’m thinking the multiple versions of python have something to do with this…
certbot require python3 for python-certbot-nginx
certbot-auto requires python2.7

removed all certbots and pythons
followed these instructions https://certbot.eff.org/lets-encrypt/ubuntutzesty-nginx.html
certbot works

followed these instructions https://certbot.eff.org/docs/install.html#certbot-auto
certbot-auto still fails with same error.

Error: couldn’t get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
Traceback (most recent call last):
File “/opt/eff.org/certbot/venv/bin/letsencrypt”, line 7, in <module>
from certbot.main import main
File “/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py”, line 5, in <module>
import logging.handlers
File “/usr/lib/python2.7/logging/__init__.py”, line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File “/usr/lib/python2.7/weakref.py”, line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref


#3

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