On Mon, Aug 31, 2015 at 11:48:42AM +0000, mrpa...@gmail.com wrote: > Hi Michael, Hi Frank,
> 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. Thanks a lot for helping me to track down this issue! Great to have someone who can reproduce the issue, I really want to track down this issue so its awsome to have you to help and answer all my questions :) > 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? This smeels like a clue: type(_("unattended-upgrades result for '%s': '%s'") should indeed be "str" instead of bytes. What version of unattended-upgrades do you have? $ apt list unattended-upgrades will tell you. Do you have in the unattended-upgrades binary the lines: """ from gettext import lgettext as _ """ > 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. What is the output of "locale"? Thanks, Michael