Suddenly a couple of python new errors out of the blue?

Ubuntu 22.04
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
certbot/jammy,jammy,now 1.21.0-1build1 all

Everytime I call certbot, appears this log trace that ends with these two main errors

    import zoneinfo
ModuleNotFoundError: No module named 'zoneinfo'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 495, in <module>
    def get_process_environ(proc_pid_fd: int) -> dict[str, str]:
TypeError: 'type' object is not subscriptable

I cannot be sure which certbot version I have (probably the latest for Ubuntu 22.04 because I have the system updated from Ubuntu repos)

Nothing have changed latetly. It's a server and I rarely access to modify anything other than regular updates.

I've been browsing forums and online and there are 0 references to this topic

What can be going on?

EDIT: Found Certbot version

Hello @SirLouen, welcome to the Let's Encrypt community. :slightly_smiling_face:

I believe that recommended method for installing Certbot is snap

What python packages were updated with the updates?

3 Likes

Super weird solution

I performed an apt purge certbot and it recommended not to purge all directories (because of the already installed certs). So after saying no, I performed an installation and everything went back to normal. It's like some python thing was corrupted at some point.

Ubuntu things in an Ubuntu world. Luckily I'm migrating to Fedora :sweat_smile:

2 Likes

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