apport-gtk crashed with ValueError in locale.format()

Bug #688535 reported by Léa GRIS
80
This bug affects 14 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: apport

multiple apport popped then crashed

Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 353, in <module>
    app.run_argv()
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 576, in run_argv
    return self.run_crashes()
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 178, in run_crashes
    self.run_crash(f)
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 290, in run_crash
    response = self.ui_present_report_details(False)
  File "/usr/share/apport/apport-gtk", line 152, in ui_present_report_details
    self.format_filesize(self.get_complete_size()))
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 703, in format_filesize
    return locale.format('%.1f MiB', size / 1048576.)
  File "/usr/lib/python2.7/locale.py", line 189, in format
    "format specifier, %s not valid") % repr(percent))
ValueError: format() must be given exactly one %char format specifier, '%.1f MiB' not valid

ProblemType: CrashDistroRelease: Ubuntu 11.04
Package: apport-gtk 1.16-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.37-8.21-generic 2.6.37-rc4
Uname: Linux 2.6.37-8-generic i686
ApportLog:

Architecture: i386
Date: Fri Dec 10 11:37:38 2010
ExecutablePath: /usr/share/apport/apport-gtkInstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/apport/apport-gtk
ProcEnviron:
 LANG=fr_FR.utf8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/apport/apport-gtk']SourcePackage: apport
Title: apport-gtk crashed with ValueError in format()
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Léa GRIS (lea-gris) wrote :
visibility: private → public
tags: removed: need-duplicate-check
Revision history for this message
Philip Muškovac (yofel) wrote :

Confirmed by duplicate.

Changed in apport (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Philip Muškovac (yofel)
description: updated
tags: added: python27
Revision history for this message
pschonmann (pschonmann) wrote :

Occured when i was merging two contacts.

Revision history for this message
Ryan Kitty (gothickitty93) wrote :

Occurred when I was reporting another bug using Apport

Revision history for this message
Daniel Kessel (dkessel) wrote :

This currently stops people from reporting any bugs about unity-related applet crashes.
Maybe the importance could be tweaked to reflect the fact that this behavior may lead to "hiding" of many bugs which may be issues for the release.

Revision history for this message
David Henningsson (diwic) wrote :

From today's daily live-CD:

ubuntu@ubuntu:~$ python
Python 2.7.1+ (r271:86832, Dec 10 2010, 15:12:46)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.format('%.1f MiB', 234.34)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/locale.py", line 189, in format
    "format specifier, %s not valid") % repr(percent))
ValueError: format() must be given exactly one %char format specifier, '%.1f MiB' not valid

ubuntu@ubuntu:~$ python2.6
Python 2.6.6 (r266:84292, Dec 10 2010, 14:51:27)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.format('%.1f MiB', 234.34)
'234.3 MiB'

Changed in apport (Ubuntu):
status: Confirmed → Triaged
summary: - apport-gtk crashed with ValueError in format()
+ apport-gtk crashed with ValueError in locale.format()
Revision history for this message
old_toby (simon-hornweb) wrote :

@Daniel Kessel

It doesn't only stop me from reporting bugs concerning unity. In my /var/crash folder there are bugs waiting to be reported from bluetooth-applet, gnome-dictionary, cupsd, and most important: an evolution bug that prevents me from actually using the calendar.

I'd say the importance should be very high.

Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk.

Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Medium → High
status: Triaged → In Progress
status: In Progress → Fix Committed
Revision history for this message
Timo Witte (spacefish) wrote :

wow cool fixed 7 minutes ago *G* had the same problem. Hopping this gets packaged real soon *G*

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.16-0ubuntu2

---------------
apport (1.16-0ubuntu2) natty; urgency=low

  * Cherrypick from trunk:
    - ui.py, format_filesize(): Fix to work with stricter locale.format() in
      Python 2.7. (LP: #688535). While we are at it, also change it to use
      base-10 units.
  * debian/rules: Fix python version check to also work with 2.7.
 -- Martin Pitt <email address hidden> Tue, 14 Dec 2010 12:23:31 +0100

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.