bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character ...

David Förster david at dfoerster.de
Thu Jul 19 11:43:54 BST 2007


Hi,

this is the output of the commands:  

dave at jupiter ~ % python -c "import sys; print sys.stdout.encoding; print u'\u00d8'"
UTF-8
Ø
dave at jupiter ~ % LC_CTYPE="de_DE.UTF-8" python -c "import sys; print sys.stdout.encoding; print u'\u00d8'"
UTF-8
Ø

I changed the system locale to UTF-8 in the meanwhile but can still reproduce the bug. 

I also tried the devel branch and received a similar error.

Regards, David


Am Mittwoch, 18. Juli 2007 19:28 schrieb Goffredo Baroncelli:
> On Wednesday 04 July 2007, David Förster wrote:
> > Hi there,
> >
> > I'm trying to make a checkout of a remote subversion repository using
> > the bzr-svn plugin (into a shared repository). Attached is the full
> > backtrace bzr spits out after copying some revisions. I tried setting
> > LC_ALL to de_DE (iso8859-15 which works well for svn itself) and
> > de_DE.UTF-8 but that didn't change anything.
> >
> > I'm using bzr 0.17 and bzr-svn 0.3.4 on Debian.
> >
> > Regards, David
>
> Hi david,
>
> could you please do the following tests, posting the output ?:
>
> $ python -c "import sys; print sys.stdout.encoding; print u'\u00d8'"
>
>
> $ LC_CTYPE="de_DE.UTF-8" python -c "import sys; print sys.stdout.encoding;
> print u'\u00d8'"
>
>
> (for what matter, u'\u00d8' is 'Ø' : a O with slash)
> Goffredo
>
> > dave at jupiter ~/.../web-bzr % bzr checkout svn+https://svn.***.de/web
> > trunk bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't
> > encode
>
> character u'\xe4' in position 59: ordinal not in range(128)
>
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 718,
> > in
>
> run_bzr_catch_errors
>
> >     return run_bzr(argv)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 679,
> > in
>
> run_bzr
>
> >     ret = run(*run_argv)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 375,
> > in
>
> run_argv_aliases
>
> >     return self.run(**all_cmd_args)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 970,
> > in
>
> run
>
> >     source.create_checkout(to_location, revision_id, lightweight)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/branch.py",
> > line
>
> 107, in create_checkout
>
> >     return self._create_heavyweight_checkout(to_location, revision_id)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/branch.py",
> > line
>
> 79, in _create_heavyweight_checkout
>
> >     checkout_branch.pull(self, stop_revision=revision_id)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165,
> > in
>
> write_locked
>
> >     return unbound(self, *args, **kwargs)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1706, in
>
> pull
>
> >     run_hooks=run_hooks)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165,
> > in
>
> write_locked
>
> >     return unbound(self, *args, **kwargs)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1492, in
>
> pull
>
> >     self.update_revisions(source, stop_revision)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165,
> > in
>
> write_locked
>
> >     return unbound(self, *args, **kwargs)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1450, in
>
> update_revisions
>
> >     self.fetch(other, stop_revision)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165,
> > in
>
> write_locked
>
> >     return unbound(self, *args, **kwargs)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 303, in
>
> fetch
>
> >     pb=nested_pb)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 364,
> > in
>
> fetch
>
> >     return inter.fetch(revision_id=revision_id, pb=pb)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/fetch.py",
> > line
>
> 446, in fetch
>
> >     self.copy_content(revision_id=revision_id, pb=pb)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/fetch.py",
> > line
>
> 393, in copy_content
>
> >     revnum, branch, changes, renames)
> >   File
> > "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/repository.py",
>
> line 216, in transform_fileid_map
>
> >     renames)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/fileids.py",
>
> line 140, in apply_changes
>
> >     return self._apply_changes(new_file_id, changes, get_children)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/fileids.py",
>
> line 223, in _apply_changes
>
> >     map[p] = new_file_id(p)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/fileids.py",
>
> line 138, in new_file_id
>
> >     return generate_file_id(revid, x)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/fileids.py",
>
> line 52, in generate_file_id
>
> >     return generate_svn_file_id(uuid, revnum, branch, path)
> >   File "/usr/lib/python2.4/site-packages/bzrlib/plugins/svn/fileids.py",
>
> line 44, in generate_svn_file_id
>
> >     ret = "%s-%s-%s" % (introduced_revision_id,
> > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in
> > position
>
> 59: ordinal not in range(128)
>
> > bzr 0.17.0 on python 2.4.4.final.0 (linux2)
> > arguments:
>
> ['/usr/bin/bzr', 'checkout', 'svn+https://svn.***.de/web', 'trunk']
>
> > ** please send this report to bazaar at lists.ubuntu.com
> >
> >
> > ~% locale
> > LANG=de_DE at euro
> > LC_CTYPE="de_DE.UTF-8"
> > LC_NUMERIC="de_DE.UTF-8"
> > LC_TIME="de_DE.UTF-8"
> > LC_COLLATE="de_DE.UTF-8"
> > LC_MONETARY="de_DE.UTF-8"
> > LC_MESSAGES="de_DE.UTF-8"
> > LC_PAPER="de_DE.UTF-8"
> > LC_NAME="de_DE.UTF-8"
> > LC_ADDRESS="de_DE.UTF-8"
> > LC_TELEPHONE="de_DE.UTF-8"
> > LC_MEASUREMENT="de_DE.UTF-8"
> > LC_IDENTIFICATION="de_DE.UTF-8"
> > LC_ALL=de_DE.UTF-8



More information about the bazaar mailing list