bzr branch produces UnicodeError

Bug #1023296 reported by Daniel Reis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

The error is produced with the with the command:
bzr branch lp:tko-install-modules-apps/6.1

This is the traceback:

bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode characters in position 50-51: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1232, in run
    source_branch=br_from)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1199, in sprout
    hardlink=hardlink)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1614, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 1463, in initialize
    delta_from_tree=delta_from_tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2253, in build_tree
    delta_from_tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2363, in _build_tree
    precomputed_delta=precomputed_delta)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 1539, in apply
    modified_paths = self._apply_insertions(mover)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 1667, in _apply_insertions
    mover.rename(self._limbo_name(trans_id), full_path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2902, in rename
    os.rename(from_, to)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 50-51: ordinal not in range(128)

bzr 2.1.4 on python 2.6.5 (Linux-2.6.32-41-generic-pae-i686-with-Ubuntu-10.04-lucid)
arguments: ['/usr/bin/bzr', 'branch', 'lp:tko-install-modules-apps/6.1']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: 'en_GB'
plugins:
  etckeeper /usr/lib/python2.6/dist-packages/bzrlib/plugins/etckeeper [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.1.4]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.1.4]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.1.4]

*** 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're running without an encoding set, LANG should be 'en_GB.utf-8' not just 'en_GB'. Fixing that will resolve the problem for you. Also, upgrading to bzr 2.5 will do the right thing with utf-8 files even where the locale is not set correctly.

Revision history for this message
Daniel Reis (dreis-pt) wrote :
Download full text (3.6 KiB)

Thanks for the quick reply. Since bzr 2.5 is not my distribution channel, so I changed LANG to en_GB.utf8 (nano /etc/default/locale).
I log in in a new session, try again and get the traceback below.

root@lapp work/tko-repo# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
root@lapp work/tko-repo# bzr branch lp:tko-install-modules-apps/6.1 tko-install-modules-apps-61
Enter passphrase for key '/root/.ssh/id_rsa':
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode characters in position 74-75: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1232, in run
    source_branch=br_from)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1199, in sprout
    hardlink=hardlink)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1614, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 1463, in initialize
    delta_from_tree=delta_from_tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2253, in build_tree
    delta_from_tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2363, in _build_tree
    precomputed_delta=precomputed_delta)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 1539, in apply
    modified_paths = self._apply_insertions(mover)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 1667, in _apply_insertions
    mover.rename(self._limbo_name(trans_id), full_path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2902, in rename
    os.rename(from_, to)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 74-75: ordinal not in range(128)

bzr 2.1.4 on python 2.6.5 (Linux-2.6.32-41-generic-pae-i686-with-Ubuntu-10.04-lucid)
arguments: ['/usr/bin/bzr', 'branch', 'lp:tko-install-modules-apps/6.1', 'tko-install-modules-apps-61']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: 'en_GB.UTF-8'
plugins:
  etckeeper /usr/lib/python2.6/dist-packages/bzrlib/plugins/etckeeper [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plug...

Read more...

Revision history for this message
Martin Packman (gz) wrote :
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.