bzr crashed with BzrError in get_unicode_argv(): Parameter ''Use Unicode \xcbdegree characters for Celsius/Farenheit'' is unsupported by the current encoding.

Bug #745712 reported by Lucian Adrian Grijincu
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Martin Packman
bzr (Ubuntu)
Fix Released
Low
Jelmer Vernooij

Bug Description

Binary package hint: bzr

I tried to copy-paste ℃ into the commit message (in the commandline). I deleted something in the string because I got an error.

The editor might have left something that's not a valid Unicode string.

bzr should catch Unicode conversion exceptions and fail gracefully.

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: bzr 2.3.1-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic i686
Architecture: i386
Date: Wed Mar 30 15:26:06 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/bzr
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110326)
InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python /usr/bin/bzr commit -m Use\ Unicode\ �degree\ characters\ for\ Celsius/Farenheit
ProcEnviron:
 SHELL=/bin/bash
 LANG=C
 LANGUAGE=ro_RO:en
PythonArgs: ['/usr/bin/bzr', 'commit', '-m', 'Use Unicode \xcbdegree characters for Celsius/Farenheit']
SourcePackage: bzr
Title: bzr crashed with BzrError in get_unicode_argv(): Parameter ''Use Unicode \xcbdegree characters for Celsius/Farenheit'' is unsupported by the current encoding.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Traceback (most recent call last):
  File "/usr/bin/bzr", line 139, in <module>
    exit_val = bzrlib.commands.main()
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1205, in main
    argv = _specified_or_unicode_argv(argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1178, in _specified_or_unicode_argv
    return osutils.get_unicode_argv()
  File "/usr/lib/python2.7/dist-packages/bzrlib/osutils.py", line 100, in get_unicode_argv
    "encoding." % a))
BzrError: Parameter ''Use Unicode \xcbdegree characters for Celsius/Farenheit'' is unsupported by the current encoding.

Related branches

Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
tags: removed: need-duplicate-check
Martin Pool (mbp)
visibility: private → public
description: updated
Revision history for this message
Martin Pool (mbp) wrote :

From the look of it that's not utf8, but I agree you should not get a traceback there.

It's a bit like what was done in <https://code.launchpad.net/~jameinel/bzr/2.1.0b4-win32-unsupported_encoding_commit_message/+merge/14603> but apparently that's not enough.

tags: added: easy error-reporting traceback unicode
Changed in bzr:
status: New → Confirmed
importance: Undecided → Low
Changed in bzr (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Martin Packman (gz) wrote :

Unix specific problem, in that having LANG=C set means even if your console supports non-ascii characters Bazaar is not being given the information needed to interpret them.

The fix is you're having this problem is to set your environment to include your encoding, like LANG=ro_RO.UTF-8 or similar.

Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :

Now it's:
mimi@lethe:~$ echo $LANG
ro_RO.UTF-8

I don't know how LANG=C happened in that shell.

Revision history for this message
Martin Packman (gz) wrote :

The code tries to treat this is as a user error, but gets called from outside the exception catching and reporting mechanism.

Changed in bzr:
assignee: nobody → Martin [gz] (gz)
status: Confirmed → In Progress
Martin Packman (gz)
Changed in bzr:
milestone: none → 2.4b2
status: In Progress → Fix Released
Jelmer Vernooij (jelmer)
Changed in bzr (Ubuntu):
assignee: nobody → Jelmer Vernooij (jelmer)
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bzr - 2.4.0~beta4-1ubuntu1

---------------
bzr (2.4.0~beta4-1ubuntu1) oneiric; urgency=low

  * Merge from Debian.

bzr (2.4.0~beta4-1) unstable; urgency=low

  * New upstream release.
   + Using "bzr blame" no longer requires user to set identity. LP: #667408
  * Bump standards version to 3.9.2 (no changes).

bzr (2.4.0~beta3-2) unstable; urgency=low

  * Add 04_fix_undecodable_argv; cope with $HOME not existing on some
    buildd machines.

bzr (2.4.0~beta3-1) unstable; urgency=low

  * New upstream release.
   + Requires at least Python 2.6 or higher.
   + Fixes permissions on directories in zip files. LP: #207253
   + Prints proper error when encountering encoding-invalid characters in
     commit messages on the commandline. LP: #745712
   + Drop patches merged upstream: 04_auto_user_id_test_fix,
   05_fix_locale_test
  * Add upper bound version dependency on python-bzrlib in bzr.
    LP: #778696

bzr (2.4.0~beta2-3) unstable; urgency=low

  * Upload to unstable.
  * Update 05_fix_locale_test to cope with home directory not existing.
 -- Jelmer Vernooij <email address hidden> Fri, 17 Jun 2011 12:30:59 +0200

Changed in bzr (Ubuntu):
status: In Progress → Fix Released
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.