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

Bug #413022 reported by stvo
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

As a test i just tried to init my current home directory as with bzr,. which leads to to following error:

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

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 716, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 547, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1564, in run
    possible_transports=[to_transport])
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 490, in create_branch_convenience
    bzrdir.create_workingtree()
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1481, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 1394, in initialize
    hardlink=hardlink, delta_from_tree=True)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2034, in build_tree
    delta_from_tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2050, in _build_tree
    for dir, files in wt.walkdirs():
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 2372, in walkdirs
    current_disk = disk_iterator.next()
  File "/usr/lib/python2.6/dist-packages/bzrlib/osutils.py", line 1308, in walkdirs
    names = sorted(_listdir(top))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 0: ordinal not in range(128)

bzr 1.13.1 on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'init']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.UTF-8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [1.13]
  email /usr/lib/python2.6/dist-packages/bzrlib/plugins/email [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [unknown]
  search /usr/lib/python2.6/dist-packages/bzrlib/plugins/search [1.7dev]
  stats /usr/lib/python2.6/dist-packages/bzrlib/plugins/stats [unknown]
  upload /usr/lib/python2.6/dist-packages/bzrlib/plugins/upload [0.1]

Revision history for this message
stvo (st-vogelsang) wrote :

The Problem is related to old files originated from former dos backups. An example to create this error is attached in the test.tgz. I hope this helps to test and recreate the error.

Revision history for this message
Vincent Ladeuil (vila) wrote :

The file names are not in a valid encoding (at least one of them) so that needs to be fixed.
But bzr should give a better error message.
Thanks for attachment that reproduces the bug.

Changed in bzr:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.