bzr add ../../.. crashes

Bug #516829 reported by Sven Oostenbrink
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

bzr add ../../.. suddenly crashes with this message:

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

*** 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
    attaching the crash file
        /home/sven/.cache/crash/bzr-20100203234934-4222.crash
    and including a description of the problem.

    The crash file is plain text and you can inspect or edit it to remove
    private information.

Searching for clues, I found that the directory ../../../bin/symantec has a symlink that points to a file that does not exist. Maybe this is related?

Traceback:
 Traceback (most recent call last):
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
     return the_callable(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
     ret = run(*run_argv)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
     return self.run(**all_cmd_args)
   File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 659, in run
     no_recurse, action=action, save=not dry_run)
   File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 53, in tree_write_locked
     return unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 504, in smart_add
     for subf in sorted(os.listdir(abspath)):
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 23: ordinal not in range(128)

BzrVersion: 2.0.3

Revision history for this message
Sven Oostenbrink (so-oostenbrink) wrote :
Revision history for this message
Sven Oostenbrink (so-oostenbrink) wrote :

Found the cause of the crash:

sven@fS-Ex:~/.......hidden..../ezcomponents/Webdav/tests/data/put_test$ ll
total 32K
drwxr-xr-x 2 sven sven 4.0K Jan 28 18:19 collection
-rw-r--r-- 1 sven sven 19K Jan 28 18:19 put_test.html
-rw-r--r-- 1 sven sven 739 Jan 28 18:19 put_test_utf8_content.txt
-rw-r--r-- 1 sven sven 21 Jan 28 18:19 put_test_utf8_filename_???????????????????????????.txt
sven@fS-Ex:~/.......hidden..../ezcomponents/Webdav/tests/data/put_test$ bzr add put_test_utf8_filename_Ïңαââ­ââ¬â±â±â.txt
Traceback (most recent call last):
  File "/usr/bin/bzr", line 142, in <module>
    exit_val = bzrlib.commands.main()
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1102, in main
    argv = osutils.get_unicode_argv()
  File "/usr/lib/python2.6/dist-packages/bzrlib/osutils.py", line 87, in get_unicode_argv
    "encoding." % a))
bzrlib.errors.BzrError: Parameter ''put_test_utf8_filename_\xcf\x82\xd2\xa3\xce\xb1\xe2\x8a\x81\xe2\x88\xad\xe2\x8b\x89\xe2\x82\xac\xe2\x82\xb1\xe2\x80\xb1\xe2\x81\x8c.txt'' is unsupported by the current encoding.
sven@fS-Ex:~/.......hidden..../ezcomponents/Webdav/tests/data/put_test$

Revision history for this message
Andrew Bennetts (spiv) wrote :

Possibly a duplicate of an existing bug report?

The problem here appears to be that the locale is "C", i.e. plain ASCII, but the tree on disk includes a UTF-8 filename. We should at least give a much better error in this case.

description: updated
description: updated
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Sven Oostenbrink (so-oostenbrink) wrote : Re: [Bug 516829] Re: bzr add ../../.. crashes
Download full text (8.8 KiB)

Notice: The filename in question is UTF because its actually a test file to
see if some webdav system would be able to manage utf filenames.. For the
rest there are NO UTF file names in the entire tree

Cheers,

Sven

On Wed, Feb 3, 2010 at 11:54 PM, Andrew Bennetts <
<email address hidden>> wrote:

> Possibly a duplicate of an existing bug report?
>
> The problem here appears to be that the locale is "C", i.e. plain ASCII,
> but the tree on disk includes a UTF-8 filename. We should at least give
> a much better error in this case.
>
> ** Description changed:
>
> bzr add ../../.. suddenly crashes with this message:
>
> bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode
> byte 0xcf in position 23: ordinal not in range(128)
>
> *** 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
> - attaching the crash file
> - /home/sven/.cache/crash/bzr-20100203234934-4222.crash
> - and including a description of the problem.
> + bug in Bazaar. You can help us fix it by filing a bug report at
> + https://bugs.launchpad.net/bzr/+filebug
> + attaching the crash file
> + /home/sven/.cache/crash/bzr-20100203234934-4222.crash
> + and including a description of the problem.
>
> - The crash file is plain text and you can inspect or edit it to remove
> - private information.
> + The crash file is plain text and you can inspect or edit it to remove
> + private information.
>
> Searching for clues, I found that the directory ../../../bin/symantec
> has a symlink that points to a file that does not exist. Maybe this is
> related?
> +
> + Traceback:
> + Traceback (most recent call last):
> + File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842,
> in exception_to_return_code
> + return the_callable(*args, **kwargs)
> + File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037,
> in run_bzr
> + ret = run(*run_argv)
> + File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654,
> in run_argv_aliases
> + return self.run(**all_cmd_args)
> + File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 659,
> in run
> + no_recurse, action=action, save=not dry_run)
> + File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line
> 53, in tree_write_locked
> + return unbound(self, *args, **kwargs)
> + File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line
> 504, in smart_add
> + for subf in sorted(os.listdir(abspath)):
> + UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 23:
> ordinal not in range(128)
>
> ** Description changed:
>
> bzr add ../../.. suddenly crashes with this message:
>
> bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode
> byte 0xcf in position 23: ordinal not in range(128)
>
> *** 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
>...

Read more...

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.