[issue134] smart search crashes with UnicodeEncodeError

Pascal Bleser pascal.bleser at skynet.be
Tue Nov 21 01:39:35 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Farning wrote:
> On Tue, 2006-11-21 at 04:23 +0100, Andreas Hanke wrote:
> 
>> % smart info
>> [lots of output]
...
>>   File "/usr/lib/python2.5/codecs.py", line 303, in write
>>     data, consumed = self.encode(object, self.errors)
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 68:
>> ordinal not in range(128)
> 
> What linux distro and version are you using?   What version of bochs is
> causing the issue. I'll look into it.
> ...

I've also seen it happen when prompting for Y/n
smart also quits with an exception "UnicodeDecodeError: 'ascii' codec
can't decode byte"

Can't reproduce it myself, but seen it on SUSE 10.1.

I even told the reporters to set LANG=en_US.UTF-8 but it didn't help.

Weird enough, it was complaining about a byte 0xC3 which is used as an
escape byte in UTF-8... but not for Y nor N.
Just typing the return key at the prompt didn't help either.

Weird.
I'll try to get in touch with those who reported it (was on IRC) to
submit the stack trace.

I really wonder why the ascii codec is used though
Could there be something wrong with
        encoding = locale.getpreferredencoding()
(smart/__init__.py:55)
?

cheers
- --
  -o) Pascal Bleser     http://linux01.gwdg.de/~pbleser/
  /\\ <pascal.bleser at skynet.be>       <guru at unixtech.be>
 _\_v The more things change, the more they stay insane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFFYslXr3NMWliFcXcRAkJ0AJ4mYzCOkRNRHWAyCWyrXtnUxH5u4ACfayuV
CllT3t4gK2rlA6rHo8YLbUw=
=us9M
-----END PGP SIGNATURE-----



More information about the Smart mailing list