UnicodeDecodeError on stderr from logging non-ascii message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Martin Packman | ||
2.4 |
Fix Released
|
Medium
|
Martin Packman |
Bug Description
C:\work\
unknown:
Список требуемых доработок 2011-02-04.doc
Установка связи.doc
C:\work\
Committing to: C:/work/
Traceback (most recent call last):
File "logging\
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 80: ordinal not in range(128)
bzr: ERROR: Path(s) are not versioned: "╨г╤Б╤В╨░╨╜╨╛╨▓╨║╨░ ╤Б╨▓╤П╨╖╨╕.doc"
The last error is correct, although the file name printed as UTF-8, but this is already known error (sigh).
I don't understand the traceback part there. Is it really needed?
C:\work\
Bazaar (bzr) 2.3b5
Python interpreter: C:\Program Files\Bazaar\
Python standard library: C:\Program Files\Bazaar\
Platform: Windows-
bzrlib: C:\Program Files\Bazaar\
Bazaar configuration: C:\Documents and Settings\
Bazaar log file: C:\work\.bzr.log
Related branches
- bzr-core: Pending requested
-
Diff: 12 lines (+3/-0)1 file modifieddoc/en/release-notes/bzr-2.4.txt (+3/-0)
Changed in bzr: | |
milestone: | none → 2.5b4 |
status: | In Progress → Fix Released |
There's arguably a logging bug here as well, but this is again another problem with stringifying exceptions that may contain non-ascii data.
The relevant stack from the exception, with Python 2.4 and an oldish bzr:
> ...\lib\ logging\ __init_ _.py(740) emit() write(fs % msg.encode( "UTF-8" )) bzr(146) ?() commands. main() site-packages\ bzrlib\ commands. py(1105) main() catch_errors( argv) site-packages\ bzrlib\ commands. py(1118) run_bzr_ catch_errors( ) to_return_ code(run_ bzr, argv) site-packages\ bzrlib\ commands. py(826) exception_ to_return_ code() site-packages\ bzrlib\ commands. py(1027) run_bzr( ) site-packages\ bzrlib\ commands. py(638) run_argv_ aliases( ) **all_cmd_ args) site-packages\ bzrlib\ builtins. py(3132) run() safe_relpath_ files(tree, exclude)) site-packages\ bzrlib\ decorators. py(194) write_locked( ) site-packages\ bzrlib\ workingtree_ 4.py(197) commit( ) commit( self, message, revprops, *args, **kwargs) site-packages\ bzrlib\ decorators. py(194) write_locked( ) site-packages\ bzrlib\ mutabletree. py(224) commit( ) master_ transports= possible_ master_ transports, site-packages\ bzrlib\ commit. py(257) commit( ) master_ transports= possible_ master_ transports) site-packages\ bzrlib\ cleanup. py(116) run() site-packages\ bzrlib\ cleanup. py(147) _do_with_ cleanups( ) site-packages\ bzrlib\ commit. py(407) _commit( ) site-packages\ bzrlib\ trace.py( 121)note( ) info(*args, **kwargs) logging\ __init_ _.py(970) info() logging\ __init_ _.py(1080) _log() logging\ __init_ _.py(1090) handle( ) rs(record) logging\ __init_ _.py(1127) callHandlers( ) logging\ __init_ _.py(642) handle( ) logging\ __init_ _.py(740) emit() write(fs % msg.encode( "UTF-8" )) edError( Path(s) are not versioned: "\xd0\xa3\ xd1\x81\ xd1\x82\ xd0\xb0\ xd0\xbd\ xd0\xbe\ xd0\xb2\ xd0\xba\ xd0\xb0" )'
-> self.stream.
(Pdb) w
...\scripts\
-> exit_val = bzrlib.
...\lib\
-> ret = run_bzr_
...\lib\
-> return exception_
...\lib\
-> return the_callable(*args, **kwargs)
...\lib\
-> ret = run(*run_argv)
...\lib\
-> return self.run(
...\lib\
-> exclude=
...\lib\
-> result = unbound(self, *args, **kwargs)
...\lib\
-> result = WorkingTree3.
...\lib\
-> result = unbound(self, *args, **kwargs)
...\lib\
-> possible_
...\lib\
-> possible_
...\lib\
-> return _do_with_cleanups(
...\lib\
-> result = func(*args, **kwargs)
...\lib\
-> note("aborting commit write group: %r" % (e,))
...\lib\
-> _bzr_logger.
...\lib\
-> apply(self._log, (INFO, msg, args), kwargs)
...\lib\
-> self.handle(record)
...\lib\
-> self.callHandle
...\lib\
-> hdlr.handle(record)
...\lib\
-> self.emit(record)
> ...\lib\
-> self.stream.
(Pdb) msg
'aborting commit write group: PathsNotVersion