[mythtvnz] tv_grab_nz-py configuration issues

Adam Bennetts abennetts at gmail.com
Thu Dec 19 10:20:16 GMT 2013


On Wed, Dec 18, 2013 at 9:31 PM, Andrew Taylor <aretaylor at gmail.com> 
wrote:
 > Hi Steve
 >
 > I gave it a go... but no luck...
 > Traceback (most recent call last):
 >   File "./tv_grab_nz-py", line 227, in <module>
 >     use = raw_input('Use channel %s (%s)? [y/N]' % (channel[1], 
channel[0]))
 > UnicodeEncodeError: 'ascii' codec can't encode character u'\u0101' in
 > position 13: ordinal not in range(128)

Hi,

I had this problem when I set this up last weekend. The error is caused 
by non-ascii characters being written to the terminal. I worked around 
it by changing the code to assume 'y' for all channels and then edited 
the output file by hand, but that's not very friendly so here's a 
better, but not probably not ideal, solution:

Change the line (no 227) in your file that looks like this:

use = raw_input('Use channel %s (%s)? [y/N]' % (channel[1], channel[0]))

to:

use = raw_input('Use channel %s (%s)? [y/N]' % 
(channel[1].encode('ascii', 'ignore'), channel[0]))

This will fix the problem by not writing any non ascii characters to the 
terminal. This means, from memory, you'll see "Use channel Mori 
Television (maori-tv.feeviewtv.nz)? [y/N]" but the correct values will 
be written to the file.

Hope it works for you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/mythtvnz/attachments/20131219/1bae10bd/attachment.html>


More information about the mythtvnz mailing list