[master] Unicode exceptions when encountering 'invalid' filenames

Bug #244360 reported by tebeka on 2008-06-30
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Unassigned

Bug Description

[13:14] mtebeka@duffy:~ $bzr st
bzr: ERROR: exceptions.UnicodeDecodeError: 'utf8' codec can't decode bytes in position 25-27: invalid data

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 807, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 178, in run
    show_pending=not no_pending)
  File "/usr/lib/python2.5/site-packages/bzrlib/status.py", line 117, in show_tree_status
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.5/site-packages/bzrlib/tree.py", line 93, in changes_from
    want_unversioned=want_unversioned,
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/tree.py", line 737, in compare
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.5/site-packages/bzrlib/delta.py", line 217, in _compare_trees
    want_unversioned=want_unversioned):
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 2346, in iter_changes
    (None, utf8_decode(current_path_info[0])[0]),
  File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 25-27: invalid data

bzr 1.6b3 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'st']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.
[13:14] mtebeka@duffy:~ $

Edmundo (eantoranz) wrote :
Download full text (6.1 KiB)

I'm using bzr 1.5 and bzr 1.6b2 and the same happened here on status:

$ ~/instaladores/bzr-1.6b2/bzr status
bzr: ERROR: exceptions.UnicodeDecodeError: 'utf8' codec can't decode bytes in position 43-46: invalid data

Traceback (most recent call last):
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/commands.py", line 807, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/builtins.py", line 178, in run
    show_pending=not no_pending)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/status.py", line 117, in show_tree_status
    want_unversioned=want_unversioned)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/tree.py", line 93, in changes_from
    want_unversioned=want_unversioned,
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/tree.py", line 734, in compare
    want_unversioned=want_unversioned)
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/delta.py", line 217, in _compare_trees
    want_unversioned=want_unversioned):
  File "/home/antoranz/instaladores/bzr-1.6b2/bzrlib/workingtree_4.py", line 2450, in iter_changes
    (None, utf8_decode(current_path_info[0])[0]),
  File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 43-46: invalid data

bzr 1.6b2 on python 2.5.2 (linux2)
arguments: ['/home/antoranz/instaladores/bzr-1.6b2/bzr', 'status']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'es_CO.UTF-8'
plugins:
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.93.0]
  launchpad /home/antoranz/instaladores/bzr-1.6b2/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

The same kind of problem happens with 1.5 (stable):
$ bzr status
bzr: ERROR: exceptions.UnicodeDecodeError: 'utf8' codec can't decode bytes in position 43-46: invalid data

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 807, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 178, in run
    show_pending=not no_pendi...

Read more...

Jelmer Vernooij (jelmer) on 2009-06-19
tags: added: encoding
John A Meinel (jameinel) wrote :

I'm sure this is a duplicate of other "Unicode exception when a non-filesystem encoded filename is present" bugs. I can't find the master bug offhand.

Changed in bzr:
status: New → Invalid
importance: Undecided → Medium
John A Meinel (jameinel) on 2009-11-12
summary: - UnicodeError running "bzr st"
+ [master] Unicode exceptions when encountering 'invalid' filenames
Changed in bzr:
status: Invalid → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers