checkout into directory crashed with UTF-8 error

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

Bug Description

i have a shared repos in /repos/
then i made an bzr init to create /repos/br1
- changed to a /big_dir/ (with probably 1000s of subdirs)
- in /big_dir/ i made "bzr checkout /repos/br1 ."
after a while it dropped me this:

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

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/site-packages/bzrlib/builtins.py", line 1336, in run
    accelerator_tree, hardlink)
  File "/usr/lib/python2.6/site-packages/bzrlib/branch.py", line 1335, in create_checkout
    hardlink=hardlink)
  File "/usr/lib/python2.6/site-packages/bzrlib/bzrdir.py", line 1609, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib/python2.6/site-packages/bzrlib/workingtree_4.py", line 1465, in initialize
    delta_from_tree=delta_from_tree)
  File "/usr/lib/python2.6/site-packages/bzrlib/transform.py", line 2150, in build_tree
    delta_from_tree)
  File "/usr/lib/python2.6/site-packages/bzrlib/transform.py", line 2166, in _build_tree
    for dir, files in wt.walkdirs():
  File "/usr/lib/python2.6/site-packages/bzrlib/workingtree.py", line 2432, in walkdirs
    current_disk = disk_iterator.next()
  File "/usr/lib/python2.6/site-packages/bzrlib/osutils.py", line 1398, in walkdirs
    abspath = top_slash + name
UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 5: ordinal not in range(128)

bzr 2.0.0 on python 2.6.4 (Linux-2.6.31-ARCH-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-glibc2.2.5)
arguments: ['/usr/bin/bzr', 'checkout', '/mnt/usb5/bckup/home/root/', '.']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.utf8'
plugins:
  bzrtools /usr/lib/python2.6/site-packages/bzrlib/plugins/bzrtools [2.0.1]
  launchpad /usr/lib/python2.6/site-packages/bzrlib/plugins/launchpad [2.0.0]
  netrc_credential_store /usr/lib/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.0.0]
  qbzr /usr/lib/python2.6/site-packages/bzrlib/plugins/qbzr [0.12.0]
-------------------------- cut --------------------------

k,sorry, i think the info that its a very big dir isn't important.
not sure if the unicode conv error refers to a filename or its content.
BTW: bzr info & bzr status worked without errors after this.
Hope the traceback helps you.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 485094] [NEW] checkout into directory crashed with UTF-8 error

2009/11/19 vs_vs <email address hidden>:

> k,sorry, i think the info that its a very big dir isn't important.
> not sure if the unicode conv error refers to a filename or its content.
> BTW: bzr info & bzr status worked without errors after this.
> Hope the traceback helps you.

Could you please try to localize (eg by running bzr under strace)
which name is causing the problem?

Thanks
--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 485094] [NEW] checkout into directory crashed with UTF-8 error

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> 2009/11/19 vs_vs <email address hidden>:
>
>> k,sorry, i think the info that its a very big dir isn't important.
>> not sure if the unicode conv error refers to a filename or its content.
>> BTW: bzr info & bzr status worked without errors after this.
>> Hope the traceback helps you.
>
> Could you please try to localize (eg by running bzr under strace)
> which name is causing the problem?
>
> Thanks

So I think this is just a dupe of the standard "non UTF-8 filename in a
UTF-8 fs_enc" bug. Because "os.listdir(u'path')" returns an 8-bit string
for any paths that it cannot decode with the current fs_enc. (Note that
python 3 will change this to returning a Unicode string with "special"
characters to indicate that it isn't a 100% valid filename.)

 duplicate 244360

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksFYsMACgkQJdeBCYSNAAMRRgCfaDxYtWB4AyXxqc3kq4p0/vGC
aBYAn3IbmWbstounly53dLw10zRkvO6H
=z8ei
-----END PGP SIGNATURE-----

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.