On 8/4/2011 2:34 AM, Martin Pool wrote:
> failed again with
...
> File "/usr/lib/python2.6/dist-packages/subunit/chunked.py", line
> 148, in flush self.output.write(''.join(buffered_bytes)) File
> "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/ui/text.py", line 540,
> in write self.wrapped_stream.write(to_write) File
> "/usr/lib/python2.6/codecs.py", line 351, in write data, consumed =
> self.encode(object, self.errors) UnicodeDecodeError: 'ascii' codec
> can't decode byte 0xc2 in position 34: ordinal not in range(128)
>
buffered_bytes sure looks like something that *should* be all byte
strings, and not Unicode at that point. I wonder how a Unicode bit snuck
in...
Or maybe it was properly encoded into bytes, but we are using a codec
wrapper. And writing bytes to a wrapper silently upcasts it to Unicode
before downcasting it in its own encoding back to bytes.
wrapped_stream seems risky with a "buffered_bytes" parameter.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 8/4/2011 2:34 AM, Martin Pool wrote:
> failed again with
...
> File "/usr/lib/ python2. 6/dist- packages/ subunit/ chunked. py", line write(' '.join( buffered_ bytes)) File pqm/bzr- pqm-workdir/ home/+trunk/ bzrlib/ ui/text. py", line 540, stream. write(to_ write) File python2. 6/codecs. py", line 351, in write data, consumed =
> 148, in flush self.output.
> "/home/
> in write self.wrapped_
> "/usr/lib/
> self.encode(object, self.errors) UnicodeDecodeError: 'ascii' codec
> can't decode byte 0xc2 in position 34: ordinal not in range(128)
>
buffered_bytes sure looks like something that *should* be all byte
strings, and not Unicode at that point. I wonder how a Unicode bit snuck
in...
Or maybe it was properly encoded into bytes, but we are using a codec
wrapper. And writing bytes to a wrapper silently upcasts it to Unicode
before downcasting it in its own encoding back to bytes.
wrapped_stream seems risky with a "buffered_bytes" parameter.
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk4 77QEACgkQJdeBCY SNAAMfHwCfW3sMT tzwp4W6X0ydSB/ IpONo /PcsOtEwNYeN2PS IKyd
fDIAoLR8PWxq+
=vcS/
-----END PGP SIGNATURE-----