apport-gtk crashed with UnicodeEncodeError in urlencode(): 'ascii' codec can't encode character u'\xf3' in position 82: ordinal not in range(128)

Bug #896626 reported by Hernan.
224
This bug affects 23 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Unassigned

Bug Description

apport-gtk crashed with UnicodeEncodeError in urlencode(): 'ascii' codec can't encode character u'\xf3' in position 82: ordinal not in range(128)

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: apport-gtk 1.90-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-1.3-generic 3.2.0-rc2
Uname: Linux 3.2.0-1-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.90-0ubuntu1
Architecture: i386
CrashCounter: 1
Date: Sat Nov 26 12:09:48 2011
ExecutablePath: /usr/share/apport/apport-gtk
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110803.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/apport/apport-gtk
PythonArgs: ['/usr/share/apport/apport-gtk']
SourcePackage: apport
Title: apport-gtk crashed with UnicodeEncodeError in urlencode(): 'ascii' codec can't encode character u'\xf3' in position 82: ordinal not in range(128)
UpgradeStatus: Upgraded to precise on 2011-11-25 (0 days ago)
UserGroups: adm admin cdrom dialout disk lpadmin plugdev sambashare

Revision history for this message
Hernan. (elmudometal) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in apport (Ubuntu):
status: New → Confirmed
tags: added: bugpattern-needed
visibility: private → public
Changed in apport (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

It's probably the title of the bug report that is an issue here.

From apport/crashdb_impl/launchpad.py:

        args = {}
        title = report.get('Title', report.standard_title())
        if title:
            args['field.title'] = title

 ...

        if not project:
            if 'SourcePackage' in report:
                return 'https://bugs.%s/%s/+source/%s/+filebug/%s?%s' % (
                    hostname, self.distro, report['SourcePackage'], handle, urllib.urlencode(args))
            else:
                return 'https://bugs.%s/%s/+filebug/%s?%s' % (
                    hostname, self.distro, handle, urllib.urlencode(args))
        else:
            return 'https://bugs.%s/%s/+filebug/%s?%s' % (
                hostname, project, handle, urllib.urlencode(args))

tags: removed: bugpattern-needed
tags: added: bugpattern-written
Martin Pitt (pitti)
Changed in apport (Ubuntu):
importance: Medium → High
Revision history for this message
Martin Pitt (pitti) wrote :

Reproduced in a test case, fixed in trunk r2167.

Changed in apport (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.93-0ubuntu1

---------------
apport (1.93-0ubuntu1) precise; urgency=low

  * New upstream bug fix release:
    - apport-gtk: Fix crash on nonexisting icon. Thanks Evan Dandrea.
      (LP: #937354)
    - ui.py, open_url(): Revert back to calling sudo instead of dropping
      privileges ourselves; with the latter, calling firefox as the sudo'ing
      user fails. (LP: #916810, #938128)
    - ui.py: Fix aborting with "AssertionError" if the report is already
      known, but without an URL. (LP: #938778)
    - launchpad.py: If a bug is already known, but the report is private, do
      not send the report. There is little sense piling up lots of duplicates.
      (LP: #938700)
    - test/crash: Fix regression of test_crash_apport(), consider $TERM a
      non-sensitive variable.
    - ui.py: Fix test failures for data collection progress, they are not
      expected to happen for "ProblemType: Crash" any more (happens in the
      background during sending, or if user clicks on "Show Details").
    - test/hooks: Use a package from Debian/Ubuntu main, so that this works
      better during package builds on build servers.
    - test/python: Do not assume that /var/crash/ exists. Use /var/tmp/ for
      the fake binaries instead.
    - data/general-hooks/parse_segv.py: Fix test case name.
    - ui.py: Fix crash on invalid core dumps. (LP: #937215)
    - launchpad.py: Fix crash on unicode report titles. (LP: #896626)
    - apport-gtk: Show the most interesting fields first in the details view.
    - do-release: Call pyflakes and abort on errors other than unused imports.
    - Move all test suites out of the code modules into test/test_<module>.py.
      This avoids having to load it every time the program runs, and also
      allows running the tests against the installed version of Apport.
    - Clean up the other executable test script in test/* and change them to
      the same structure as the module tests.
  * debian/control: Add python-mock and GTK gir build dependencies for the
    gtk/kde tests.
  * debian/control: Add procps dependency to avoid a "command not found" error
    for killall in the ubuntu.py general hook during the test suite.
  * debian/control: Add missing python-gi dependency to apport-gtk.
 -- Martin Pitt <email address hidden> Thu, 23 Feb 2012 16:22:37 +0100

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
drink (martin-espinoza) wrote :

I am having the same or similar problem with apport 2.61-ubuntu9
Is this the same problem?

drink@alexander:~$ ubuntu-bug nautilus
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "overlay-scrollbar"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 588, in <module>
    app.run_argv()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 637, in run_argv
    return self.run_report_bug()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 439, in run_report_bug
    self.collect_info(symptom_script)
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 990, in collect_info
    icthread.exc_raise()
  File "/usr/lib/python3/dist-packages/apport/REThread.py", line 64, in exc_raise
    raise self._exception[1].with_traceback(self._exception[2])
  File "/usr/lib/python3/dist-packages/apport/REThread.py", line 34, in run
    self._retval = self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 87, in thread_collect_info
    report.add_package_info(package)
  File "/usr/lib/python3/dist-packages/apport/report.py", line 310, in add_package_info
    dep, v, self._customized_package_suffix(dep))
  File "/usr/lib/python3/dist-packages/apport/report.py", line 244, in _customized_package_suffix
    mod = packaging.get_modified_files(package)
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 256, in get_modified_files
    s = os.stat('/' + words[-1].decode('UTF-8'))
UnicodeEncodeError: 'ascii' codec can't encode character '\xed' in position 40: ordinal not in range(128)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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