UnicodeDecodeError when reporting problem starting external editor
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/
added file1.rb
added file2.rb
aborting commit write group: UnicodeDecodeEr
nom de fichier, de r\xe9pertoire ou de volume incorrecte', 43, 44, 'ordinal not
in range(128)')
bzr: ERROR: exceptions.
in position 43: ordinal not in range(128)
Traceback (most recent call last):
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
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-
arguments: ['bzr', 'commit']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
bzrtools C:\Program Files\Bazaar\
colo C:\Program Files\Bazaar\
explorer C:\Program Files\Bazaar\
fastimport C:\Program Files\Bazaar\
launchpad C:\Program Files\Bazaar\
loom C:\Program Files\Bazaar\
netrc_
[2.2.1]
news_merge C:\Program Files\Bazaar\
pipeline C:\Program Files\Bazaar\
qbzr C:\Program Files\Bazaar\
rewrite C:\Program Files\Bazaar\
svn C:\Program Files\Bazaar\
upload C:\Program Files\Bazaar\
xmloutput C:\Documents and Settings\
.0\plugins\
*** 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:/
including this traceback and a description of the problem.
summary: |
- unicode error on bzr commit (UnicodeDecodeError) + UnicodeDecodeError when reporting problem starting external editor |
tags: | added: check-for-breezy |
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.