apturl-gtk crashed with UnicodeDecodeError in parseArgs(): 'ascii' codec can't decode byte 0xe3 in position 18: ordinal not in range(128)

Bug #911144 reported by minoru sinohara
54
This bug affects 6 people
Affects Status Importance Assigned to Milestone
apturl (Ubuntu)
Fix Released
Medium
Canonical Foundations Team
Precise
Fix Released
Medium
Canonical Foundations Team

Bug Description

TEST CASE:
0. Install a non-english locale like fr or ja
1. In a terminal run the following command:
$ LANG=fr_FR.utf8 apturl-gtk azertyuiop

EXPECTED RESULT:
A dialog pops up displaying a localized error message "Invalid url: 'azertyuiop' given, exiting"

ACTUAL RESULT:
It crashes with the trace below:

-----
Traceback (most recent call last):
  File "/usr/bin/apturl-gtk", line 48, in <module>
    sys.exit(apturl.main())
  File "/usr/lib/python2.7/dist-packages/AptUrl/AptUrl.py", line 172, in main
    apturl_list = self.parseArgs()
  File "/usr/lib/python2.7/dist-packages/AptUrl/AptUrl.py", line 151, in parseArgs
    "%s" % str(e))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)
-----

=== Original Description ===

I don't know

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: apturl 0.5.1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-7.13-generic 3.2.0-rc7
Uname: Linux 3.2.0-7-generic i686
ApportVersion: 1.90-0ubuntu1
Architecture: i386
Date: Tue Jan 3 18:50:46 2012
ExecutablePath: /usr/bin/apturl-gtk
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20111129.1)
InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python /usr/bin/apturl-gtk /home/username/ドキュメント/Marble Arena 2/bin/arena_32
ProcEnviron:
 PATH=(custom, no user)
 LANG=ja_JP.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/apturl-gtk', '/home/username/\xe3\x83\x89\xe3\x82\xad\xe3\x83\xa5\xe3\x83\xa1\xe3\x83\xb3\xe3\x83\x88/Marble', 'Arena', '2/bin/arena_32']
SourcePackage: apturl
Title: apturl-gtk crashed with UnicodeDecodeError in parseArgs(): 'ascii' codec can't decode byte 0xe3 in position 18: ordinal not in range(128)
UpgradeStatus: Upgraded to precise on 2012-01-02 (1 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
minoru sinohara (mwgfq579) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:
1. Is this reproducible?
2. If so, what specific steps should we take to recreate this bug? Be as detailed as possible.
This will help us to find and resolve the problem.

visibility: private → public
Changed in apturl (Ubuntu):
status: New → Incomplete
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I've been able to reproduce with the following command:
$ LANG=fr_FR.utf8 apturl-gtk azertyuiop

Gtk-WARNING **: Unknown property: GtkDialog.has-separator
Traceback (most recent call last):
  File "/usr/bin/apturl-gtk", line 48, in <module>
    sys.exit(apturl.main())
  File "/usr/lib/python2.7/dist-packages/AptUrl/AptUrl.py", line 172, in main
    apturl_list = self.parseArgs()
  File "/usr/lib/python2.7/dist-packages/AptUrl/AptUrl.py", line 151, in parseArgs
    "%s" % str(e))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)

Changed in apturl (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
importance: Undecided → High
status: Incomplete → Triaged
tags: added: rls-mgr-p-tracking
description: updated
tags: added: testcase
Changed in apturl (Ubuntu Precise):
importance: High → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apturl - 0.5.1ubuntu3

---------------
apturl (0.5.1ubuntu3) precise; urgency=low

  * Take the unicode representation of the parser error message instead
    of the string representation, so that we get clean i18n handling.
    LP: #911144.
 -- Steve Langasek <email address hidden> Sat, 24 Mar 2012 02:33:27 -0700

Changed in apturl (Ubuntu Precise):
status: Triaged → 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.