uncaught exception: bzr: ERROR: exceptions.UnicodeDecodeError:

Bug #56680 reported by Reinhard Tartler on 2006-08-17
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Diffstat Plugin
High
Russ Brown

Bug Description

>> bzr diffstat -rbranch:../DAspectC++
bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 45: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 697, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 659, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 281, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/siretart/.bazaar/plugins/diffstat/__init__.py", line 27, in run
    diff = self.__diff(bzrdir, revision, file_list)
  File "/home/siretart/.bazaar/plugins/diffstat/__init__.py", line 49, in __diff
    out.seek(0)
  File "StringIO.py", line 107, in seek
    self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 45: ordinal not in range(128)

bzr 0.9.0 on python 2.4.4.candidate.0 (linux2)
arguments: ['/usr/bin/bzr', 'diffstat', '-rbranch:../DAspectC++']

** please send this report to <email address hidden>
zsh: exit 3 bzr diffstat -rbranch:../DAspectC++

John A Meinel (jameinel) wrote :

This seems to be a bug in the diffstat plugin, possibly something to do with not supporting Unicode filenames.

diffstat doesn't seem to have a launchpad entry, so I can't re-assign it just yet, but I'll try to get in touch with Michael Ellerman who seems to maintain it.

Changed in bzr:
importance: Undecided → Low
status: Unconfirmed → Needs Info
Torsten Spindler (tspindler) wrote :

I do encounter a similar problem when a file with a non-ascii character is present in the directory.

Torsten Spindler (tspindler) wrote :

The attached zip contains the file triggering the error.

Launchpad Janitor (janitor) wrote :

[Expired for Bazaar because there has been no activity for 60 days.]

James Westby (james-w) wrote :

Doesn't look like this should have been expired.

Thanks,

James

Changed in bzr:
status: Invalid → New
bobthevirus (bobthevirus-gmail) wrote :

This should probably be assigned to the bzr-diffstat package in launchpad, which now exists.

Russ Brown (pickscrape) wrote :

I'll try to see if I can reproduce this soon.

Russ Brown (pickscrape) wrote :

I'm struggling to reproduce this due to an encoding error when attempting to bzr add the file in Lektuere.zip.

I've raised #243424 to get that problem solved so I can continue.

Changed in bzr-diffstat:
assignee: nobody → pickscrape
importance: Low → High
status: New → Confirmed
Saša Janiška (gour) wrote :

Hello,

today when I want to add some old project (book) under bzr, I've encountered this error.

Here is the trace:

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

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 926, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 1126, in run_bzr
    ret = run(*run_argv)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 713, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/builtins.py", line 650, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/mutabletree.py", line 50, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/mutabletree.py", line 558, in smart_add
    for subf in sorted(os.listdir(abspath)):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xbe in position 6: ordinal not in range(128)

bzr 2.3.3 on python 2.7.1 (FreeBSD-9.0-CURRENT-amd64-64bit-ELF)
arguments: ['/usr/local/bin/bzr', 'add', '.']
plugins: bash_completion[2.3.3], bzrtools[2.3.1], colo[0.2.1],
    explorer[1.1.2], fastimport[0.11.0dev], git[0.6.0], launchpad[2.3.3],
    netrc_credential_store[2.3.3], news_merge[2.3.3], qbzr[0.20.0]
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

*** 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
    including this traceback and a description of the problem.

Considering it's reported quite some time ago, it would be nice to fix it before 2.4.

Sincerely,
Gour

Saša Janiška (gour) wrote :

It looks that same/similar thing is reported in https://bugs.launchpad.net/bzr-submit/+bug/67973 ?

Sincerely,
Gour

Bartłomiej Żogała (nusch) wrote :

Same problem here, during bzr init in some already started project

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers