I have done some research and seen solutions but none have worked for me.
Python - 'ascii' codec can't decode byte
This didn\'t work for me. And
Based on what you want to do with your lines, you can do different work here, if you just want to print in consul as normally the consuls use utf8
encoding you dont need to do that by your self as the format of your string is not unicode
:
>>> output_string = '\n'.join(output_lines)
>>> print output_string
But if you want to write to file you can use codecs module:
import codecs
f= codecs.open('out_file','w',encoding='utf8')