UnicodeDecode error while printing line (#539258)

Parth Malwankar parth.malwankar at gmail.com
Mon Mar 15 21:15:01 GMT 2010


Hello,

I am seeing a UnicodeDecodeError[1] in bzr-grep while
writing to terminal.

   File "/home/parthm/.bazaar/plugins/grep/__init__.py", line 144, in run
     verbose, self.outf)
   File "/home/parthm/.bazaar/plugins/grep/grep.py", line 107, in
workingtree_grep
     include, exclude, verbose, outf, path_prefix)
   File "/home/parthm/.bazaar/plugins/grep/grep.py", line 146, in dir_grep
     print_revno, include, exclude, verbose, outf, path_prefix)
   File "/home/parthm/.bazaar/plugins/grep/grep.py", line 240, in _file_grep
     outf.write(pfmt % (line,))
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xa4 in position
7: ordinal not in range(128)

What is the suggested way to fix this? outf above is the instance attribute
for the grep command derived from the Command class.

Thanks,
Parth

[1] https://bugs.launchpad.net/bzr-grep/+bug/539258



More information about the bazaar mailing list