allejok96 / jw-scripts

Index or download videos and sound recordings from jw.org.
GNU General Public License v3.0
49 stars 10 forks source link

UnicodeEncodeError #21

Closed jongkok closed 4 years ago

jongkok commented 4 years ago

Dear Brother

Thank you for your script. Perhaps you could help with error I experienced: image

Thank you.

jongkok commented 4 years ago

I changed output.py:

def _write_to_m3u(source, name, file): """Write entry to a M3U playlist file.""" _truncate_file(file, string='#EXTM3U\n') with open(file, 'a', encoding='utf-8') as f: f.write('#EXTINF:0,' + name + '\n' + source + '\n')

and no more error.

allejok96 commented 4 years ago

Thanks for bringing my attention to this.

This is the second issue with utf-8 encoding/decoding, and I guess there are probably more in the code.

I'll give it a overlook and try to fix all of them...