import from tarball fails with UnicodeDecodeError on non-ascii filenames

Bug #623108 reported by Aaron Levy on 2010-08-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BzrTools
Undecided
Unassigned
DEPRECATED Pantheon
Won't Fix
Undecided
Unassigned

Bug Description

Full error:

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 26: 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/plugins/bzrtools/command.py", line 13, in run_argv_aliases
    commands.Command.run_argv_aliases(self, argv, alias_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/plugins/bzrtools/command_classes.py", line 506, in run
    do_import(source, tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/upstream_import.py", line 276, in do_import
    import_tar(tree, tar_input)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/upstream_import.py", line 171, in import_tar
    import_archive(tree, tar_file)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/upstream_import.py", line 207, in import_archive
    trans_id = tt.trans_id_tree_path(relative_path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 301, in trans_id_tree_path
    path = self.canonical_path(path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 1380, in canonical_path
    abs = self._tree.abspath(path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 394, in abspath
    return pathjoin(self.basedir, filename)
  File "/usr/lib/python2.6/posixpath.py", line 70, in join
    path += '/' + b

I was able to do an import from the extracted contents. In #bzr it was suggested that: "the tarball import code assumes all filenames are ascii, but the import from filesystem directory can use the system locale to guess filesystem encoding."

Related branches

Aaron Levy (aaronlevy) on 2010-11-19
Changed in pantheon:
status: New → Won't Fix
Aaron Bentley (abentley) on 2011-04-29
Changed in bzrtools:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers