missing signatures

John A Meinel john at
Mon May 8 20:16:08 BST 2006

Erik Bågfors wrote:
> On 5/8/06, John A Meinel <john at> wrote:
>> Erik Bågfors wrote:
>> > After reading this, I thought I should sign my commits. It felt natural
>> > to run
>> > sign-my-commits.  It dies with the following
>> >
>> > : [bagfors at zyrgelkwyt]$ ; bzr sign-my-commits
>> > erik at
>> > bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode
>> > byte 0xc3 in position 10: ordinal not in range(128)
>> >  at /home/bagfors/src/bzr/ line 139
>> >  in as_text_lines
>> >
>> > /Erik
>> What version of bzr are you using? Because I know there was a patch
>> around that fixed testament to properly encode things as utf-8, and I'm
>> hoping we don't have a regression.
> latest (which is 0.8 :) )
>> I'll look through my encoding branch, and see if testament fails with
>> Unicode committers.
> Ok

Can you send me a more complete backtrace?

The line in question is doing:
return [line.encode('utf-8') for line in r]

So it is supposed to be encoding things properly. It would seem that 
somewhere internally we are actually pre-encoding into utf-8, and then 
we are encoding again into utf-8 (which tries to decode as ascii first, 
and fails).

Also, if you could change that line to something like:
   lines = []
   for l in r:
     except UnicodeError:
       mutter('Failed to encode line: %r', l)
   return lines

That way we could figure out what line is actually failing.

More information about the bazaar mailing list