import from tarball fails with UnicodeDecodeError on non-ascii filenames

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

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/", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/", line 13, in run_argv_aliases
    commands.Command.run_argv_aliases(self, argv, alias_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/", line 506, in run
    do_import(source, tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/", line 276, in do_import
    import_tar(tree, tar_input)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/", line 171, in import_tar
    import_archive(tree, tar_file)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/", line 207, in import_archive
    trans_id = tt.trans_id_tree_path(relative_path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 301, in trans_id_tree_path
    path = self.canonical_path(path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 1380, in canonical_path
    abs = self._tree.abspath(path)
  File "/usr/lib/python2.6/dist-packages/bzrlib/", line 394, in abspath
    return pathjoin(self.basedir, filename)
  File "/usr/lib/python2.6/", 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