UnicodeDecodeError when reporting problem starting external editor

Bug #714529 reported by ZeWaren
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

Here is what happened:
My Windows is in French, but the files don't have accents in their names.

>bzr commit
Committing to: C:/Documents and Settings/Me/Mes documents/work/project_folder/
added file1.rb
added file2.rb
aborting commit write group: UnicodeDecodeError('ascii', '[Error 123] Syntaxe du
 nom de fichier, de r\xe9pertoire ou de volume incorrecte', 43, 44, 'ordinal not
 in range(128)')
bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9
in position 43: ordinal not in range(128)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 912, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1112, in run_bzr
  File "bzrlib\commands.pyo", line 690, in run_argv_aliases
  File "bzrlib\commands.pyo", line 705, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 3200, in run
  File "bzrlib\decorators.pyo", line 194, in write_locked
  File "bzrlib\workingtree_4.pyo", line 197, in commit
  File "bzrlib\decorators.pyo", line 194, in write_locked
  File "bzrlib\mutabletree.pyo", line 201, in commit
  File "bzrlib\commit.pyo", line 286, in commit
  File "bzrlib\cleanup.pyo", line 131, in run
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\commit.pyo", line 426, in _commit
  File "bzrlib\builtins.pyo", line 3181, in get_message
  File "bzrlib\msgeditor.pyo", line 148, in edit_commit_message_encoded
  File "bzrlib\msgeditor.pyo", line 73, in _run_editor
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 43: ordinal
 not in range(128)

bzr 2.2.1 on python 2.6.4 (Windows-XP-5.1.2600-SP3)
arguments: ['bzr', 'commit']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.2.0]
  colo C:\Program Files\Bazaar\plugins\colo [0.1.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.1.1]
  fastimport C:\Program Files\Bazaar\plugins\fastimport [0.9.0dev]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.2.1]
  loom C:\Program Files\Bazaar\plugins\loom [2.2.1dev]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store
[2.2.1]
  news_merge C:\Program Files\Bazaar\plugins\news_merge [2.2.1]
  pipeline C:\Program Files\Bazaar\plugins\pipeline [unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.19.2]
  rewrite C:\Program Files\Bazaar\plugins\rewrite [0.6.1]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.4]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Documents and Settings\Me\Application Data\bazaar\2
.0\plugins\xmloutput [0.8.6]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

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

You have one of the environmental variables BZR_EDITOR, EDITOR, or VISUAL, or editor set in the bazaar.conf file, to either a non-existent path or a path with a space in it. The spaces issue has just been fixed in bug 220331, but finding and changing the problem path will be necessary for now.

This particular bug is due to bad logging of the exception instance in bzrlib.msgeditor._run_editor which incorrectly uses `str(e)` when the error message may contain non-ascii characters on some systems, and bug 273978 covers the overall problem.

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Martin Packman (gz)
summary: - unicode error on bzr commit (UnicodeDecodeError)
+ UnicodeDecodeError when reporting problem starting external editor
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.