UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 28: ordinal not in range(128)

Bug #813917 reported by Martijn van Brummelen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

while running bzr add on debian sid :

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 28: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 716, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 51, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 452, in smart_add
    adder.add(file_list, recurse=recurse)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 750, in add
    for subf in sorted(os.listdir(abspath)):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 28: ordinal not in range(128)

bzr 2.4b5 on python 2.6.7 (Linux-2.6.26-1-xen-686-i686-with-debian-wheezy-sid)
arguments: ['/usr/bin/bzr', 'add']
plugins: bash_completion[2.4b5], bzrtools[2.4.0], changelog_merge[2.4b5],
    etckeeper[unknown], launchpad[2.4b5], netrc_credential_store[2.4b5],
    news_merge[2.4b5], weave_fmt[2.4b5]
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None

*** 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.

Tags: debian sid
Revision history for this message
Martijn van Brummelen (martijn-brumit) wrote :

bzr --version
Bazaar (bzr) 2.4b5
  Python interpreter: /usr/bin/python 2.6.7
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.26-1-xen-686-i686-with-debian-wheezy-sid
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /root/.bazaar
  Bazaar log file: /root/.bzr.log

Copyright 2005-2011 Canonical Ltd.
http://bazaar.canonical.com/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Bazaar is part of the GNU Project to produce a free operating system.

Revision history for this message
John A Meinel (jameinel) wrote :

You're system is claiming that all files are encoded in ASCII, but you probably have a file which has non-ascii characters.

You can probably set LANG=en.UTF-8

I thought we had a bug saying "if the system claims to be ASCII, just use UTF-8", but I can't find it right now. So in the short term, consider this bug to be that.

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Martijn van Brummelen (martijn-brumit) wrote :

Hi John,

Export LANG=en.UTF-8 solves this problem.
Thanks.

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.