Hi Michael,

Thanks for looking into the issue. I'm getting almost the exact same error message. It started a few weeks ago. The issue is reproducible whether I run unattended-upgrades from the shell or from cron.

      File "/usr/bin/unattended-upgrade", line 815, in send_summary_mail
        host(), res)
    TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'
This statement is causing the error on my system:

subject = _("unattended-upgrades result for '%s': '%s'") % (host(), res)

res argument is 'None'. host() is a string. type(_("unattended-upgrades result for '%s': '%s'")) is <class 'bytes'>. Shouldn't this be string? My locale is de_DE.UTF-8. gettext on the shell does return a translation:

# gettext unattended-upgrades "unattended-upgrades result for '%s': '%s'"
    Unattended-Upgrades-Ergebnis für »%s«: %s

If I change the message to be translated, unattended-upgrades continues, but complains about another _(...) message further down.

Now I'm lost. Any help is greatly appreciated.

Frank

Reply via email to