UnicodeDecodeError with "bzr fast-import"

Teemu Likonen tlikonen at iki.fi
Sun May 18 15:46:15 BST 2008


Teemu Likonen wrote (2008-05-18 12:31 +0300):

> The other repo does not convert at all. It stops almost immediately and
> displays the following error:
> 
>   bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode
>   byte 0xc3 in position 5: ordinal not in range(128)

Here are simple steps to reproduce:

$ mkdir testdir
$ cd testdir

$ mkdir repo.git
$ cd repo.git
$ git init
$ echo Ääkkösiä >Ääkkösiä
$ git add .
$ git commit -m Ääkkösiä
$ git fast-export HEAD >../git.dump

$ cd ..

$ bzr init repo.bzr
$ cd repo.bzr
$ bzr fast-import ../git.dump

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

Traceback (most recent call last):
  File "/home/dtw/Documents/Tietokoneet/Ohjelmavarastot/bzr.dev/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/dtw/Documents/Tietokoneet/Ohjelmavarastot/bzr.dev/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/home/dtw/Documents/Tietokoneet/Ohjelmavarastot/bzr.dev/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/dtw/.bazaar/plugins/fastimport/__init__.py", line 161, in run
    params, verbose)
  File "/home/dtw/.bazaar/plugins/fastimport/__init__.py", line 50, in _run
    return proc.process(p.iter_commands)
  File "/home/dtw/.bazaar/plugins/fastimport/processor.py", line 83, in process
    self._process(command_iter)
  File "/home/dtw/.bazaar/plugins/fastimport/processors/generic_processor.py", line 227, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/home/dtw/.bazaar/plugins/fastimport/processor.py", line 105, in _process
    handler(self, cmd)
  File "/home/dtw/.bazaar/plugins/fastimport/processors/generic_processor.py", line 389, in commit_handler
    handler.process()
  File "/home/dtw/.bazaar/plugins/fastimport/processor.py", line 170, in process
    handler(self, fc)
  File "/home/dtw/.bazaar/plugins/fastimport/processors/generic_processor.py", line 670, in modify_handler
    filecmd.is_executable, data)
  File "/home/dtw/.bazaar/plugins/fastimport/processors/generic_processor.py", line 798, in _modify_inventory
    ie = inventory.make_entry(kind, basename, parent_ie.file_id, file_id)
  File "/home/dtw/Documents/Tietokoneet/Ohjelmavarastot/bzr.dev/bzrlib/inventory.py", line 1307, in make_entry
    name = ensure_normalized_name(name)
  File "/home/dtw/Documents/Tietokoneet/Ohjelmavarastot/bzr.dev/bzrlib/inventory.py", line 1326, in ensure_normalized_name
    norm_name, can_access = osutils.normalized_filename(name)
  File "/home/dtw/Documents/Tietokoneet/Ohjelmavarastot/bzr.dev/bzrlib/osutils.py", line 1007, in _inaccessible_normalized_filename
    normalized = unicodedata.normalize('NFC', unicode(path))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)

bzr 1.6dev on python 2.4.4 (linux2)
arguments: ['/home/dtw/bin/bzr', 'fast-import', '../git.dump']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'fi_FI.UTF-8'
plugins:
  bzrtools             /home/dtw/.bazaar/plugins/bzrtools [1.5.0]
  fastimport           /home/dtw/.bazaar/plugins/fastimport [unknown]
  launchpad            /home/dtw/Documents/Tietokoneet/Ohjelmavarastot/bzr.dev/bzrlib/plugins/launchpad [unknown]
  rebase               /home/dtw/.bazaar/plugins/rebase [0.3.0]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.



More information about the bazaar mailing list