Package: unattended-upgrades
Version: 2.11+nmu1
Severity: important
X-Debbugs-Cc: farb...@vodafonemail.de

Dear Maintainer,

   * What led up to the situation?

unattended upgrade doing its job, configured to send email to local root as

  Unattended-Upgrade::Mail "root";

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Letting unattended upgrade do its automatic background job.

   * What was the outcome of this action?

The upgrade itself seems to have completed OK, but the final mail was not
sent due to the following Python error reported in
/var/log/unattended-upgrades/unattended-upgrades.log:

------------------------- snip -------------------------
2024-09-18 10:56:42,001 ERROR An error occurred: cannot import name 
'HeaderWriteError' from 'email.errors' (/usr/lib/python3.12/email/errors.py)
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 2246, in main
    send_summary_mail(res.pkgs, res.success, res.result_str,
  File "/usr/bin/unattended-upgrade", line 1728, in send_summary_mail
    ret = _send_mail_using_sendmail(from_email, to_email, subject, body)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/unattended-upgrade", line 1624, in _send_mail_using_sendmail
    sendmail.stdin.write(msg.as_string())
                         ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/email/message.py", line 181, in as_string
    from email.generator import Generator
  File "/usr/lib/python3.12/email/generator.py", line 17, in <module>
    from email.errors import HeaderWriteError
ImportError: cannot import name 'HeaderWriteError' from 'email.errors' 
(/usr/lib/python3.12/email/errors.py)
------------------------- snip -------------------------

   * What outcome did you expect instead?

Get a mail with the upgrade results.

   * Background information

This is most likely not a bug in u-u itself, but rather some dependency
issue.  It should be related to a missing fix for Python bug
https://github.com/python/cpython/issues/121650.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.10.4-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages unattended-upgrades depends on:
ii  debconf [debconf-2.0]      1.5.87
ii  lsb-base                   11.6
ii  lsb-release                12.1-1
ii  python3                    3.12.5-1+b1
ii  python3-apt                2.9.0+b1
ii  python3-dbus               1.3.2-5+b3
ii  python3-distro-info        1.7
ii  sysvinit-utils [lsb-base]  3.10-2
ii  ucf                        3.0043+nmu1
ii  xz-utils                   5.6.2-2

Versions of packages unattended-upgrades recommends:
ii  anacron             2.3-40
ii  cron [cron-daemon]  3.0pl1-189
ii  systemd-sysv        256.6-1

Versions of packages unattended-upgrades suggests:
ii  bsd-mailx                       8.1.2-0.20220412cvs-1
pn  needrestart                     <none>
ii  postfix [mail-transport-agent]  3.9.0-3
ii  powermgmt-base                  1.37+nmu1
ii  python3-gi                      3.48.2-1+b1

-- debconf information:
* unattended-upgrades/enable_auto_updates: true

Reply via email to