Skip to content

import name _remove_dead_weakref after apt upgrade #76

@thomasrebele

Description

@thomasrebele

I've executed a apt upgrade on a Debian 11.6 and now I get these error messages with a new ansible-letsencrypt role

fatal: [**domain**]: FAILED! => {"changed": true, "cmd": ["/usr/local/share/letsencrypt/env/bin/letsencrypt", "-n", "--agree-tos", "--text", "-d", "**domain**", "-d", "www.**domain**", "--email", "**mail**", "--expand", "-a", "webroot", "--webroot-path", "/var/www/**path**/", "certonly"], "delta": "0:00:00.020913", "end": "2023-01-30 21:03:12.039327", "msg": "non-zero return code", "rc": 1, "start": "2023-01-30 21:03:12.018414", "stderr": "Traceback (most recent call last):\n  File \"/usr/local/share/letsencrypt/env/bin/letsencrypt\", line 7, in <module>\n    from certbot.main import main\n  File \"/usr/local/share/letsencrypt/env/local/lib/python2.7/site-packages/certbot/main.py\", line 4, in <module>\n    import logging.handlers\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 26, in <module>\n    import sys, os, time, cStringIO, traceback, warnings, weakref, collections\n  File \"/usr/lib/python2.7/weakref.py\", line 14, in <module>\n    from _weakref import (\nImportError: cannot import name _remove_dead_weakref", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/local/share/letsencrypt/env/bin/letsencrypt\", line 7, in <module>", "    from certbot.main import main", "  File \"/usr/local/share/letsencrypt/env/local/lib/python2.7/site-packages/certbot/main.py\", line 4, 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"], "stdout": "", "stdout_lines": []}
...ignoring

I've found several discussions (example) that recommend deleting the certbot-auto virtual environment to recreate it. Does the advice apply to this repo, too? If yes, how to do that? I've tried renaming /usr/local/share/letsencrypt/ to recreate it, but then ansible-letsencrypt complains that the directory has not been found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions