ubuntu-support-status return "TypeError: not enough arguments for format string" due to bad translations

Bug #1703827 reported by backit
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Undecided
Unassigned
language-pack-gd (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
language-pack-it (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
update-manager (Ubuntu)
Medium
Unassigned
Xenial
Undecided
Unassigned

Bug Description

in Ubuntu 16.04.2 LTS fresh install no upgrade from other ubuntu version. update-manager version 16.04.6.
Running command:
ubuntu-support-status
Return only the error:
"
Traceback (most recent call last):
  File "/usr/bin/ubuntu-support-status", line 151, in <module>
    'time' : time})
TypeError: not enough arguments for format string
"

Solution is to add a space in line 151 before " , so the line was:
print(_("You have %(num)s packages (%(percent).1f%%) supported until %(time)s") % {
and become:
print(_("You have %(num)s packages (%(percent).1f%%) supported until %(time)s ") % {

Notice the space after %(time)s.

Best regards.

Revision history for this message
Brian Murray (brian-murray) wrote :

I wasn't able to recreate this issue e.g. the original code works fine for me.

That being said it certainly appears to be an issue affecting a lot of people:

https://errors.ubuntu.com/problem/76dc05ff3a34f1b74353bf3103378e872e58dea2

There about 260 reports from 16.04 users regarding it.

tags: added: xenial
Changed in update-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

Well some of them in errors are due to bad translations. From it.po:

2468 #: ../ubuntu-support-status:145
2469 msgid "You have %(num)s packages (%(percent).1f%%) supported until %(time)s"
2470 msgstr "Ci sono %(num)s pacchetti (%percent).1f%%) supportati fino a %(time)s"

Notice the missing ( in (%percent).

Revision history for this message
Brian Murray (brian-murray) wrote :

gd.po:msgid "You have %(num)s packages (%(percent).1f%%) supported until %(time)s"
gd.po-msgstr "Tha agad % (num)s pacaidean (%(percent).1f%%) le taic gu %(time)s"

lt.po:msgid "You have %(num)s packages (%(percent).1f%%) supported until %(time)s"
lt.po-msgstr "Jūs turite %(num)s paketų (%(percent).1f %%) palaikomų iki %(time)s"

sl.po:msgid "You have %(num)s packages (%(percent).1f%%) supported until %(time)s"
sl.po-msgstr "Imate %(num) paketov (%(percent).1f%%), ki so podprti do %(time)"

Changed in update-manager (Ubuntu):
status: Confirmed → Triaged
summary: ubuntu-support-status return "TypeError: not enough arguments for format
- string"
+ string" due to bad translations
Changed in update-manager (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
milestone: none → ubuntu-17.08
milestone: ubuntu-17.08 → ubuntu-17.07
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu Xenial):
status: New → Confirmed
tags: added: id-59692f0b86d83287eaa36c49
Changed in language-pack-gd (Ubuntu Xenial):
status: New → Confirmed
Changed in language-pack-gd (Ubuntu):
status: New → Confirmed
Changed in language-pack-it (Ubuntu Xenial):
status: New → Confirmed
Changed in language-pack-it (Ubuntu):
status: New → Confirmed
Changed in update-manager (Ubuntu):
milestone: ubuntu-17.07 → ubuntu-18.04.1
Changed in update-manager (Ubuntu):
milestone: ubuntu-18.04.1 → none
assignee: Brian Murray (brian-murray) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers