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 I know the 0xe9 is the é character. But I still can't figure out how to get this working, here is my code
output_lines = ['<menu>', '<day name="monday">', '<meal name="BREAKFAST">', '<counter name="Entreé">', '<dish>', '<name icon1="Vegan" icon2="Mindful Item">', 'Cream of Wheat (Farina)','</name>', '</dish>', '</counter >', '</meal >', '</day >', '</menu >']
output_string = '\n'.join([line.encode("utf-8") for line in output_lines])
And this give me the error ascii codec cant decode byte 0xe9
And I have tried decoding, I have tried to replace the "é" but can't seem to get that to work either.
output_linesis empty so your loop won't do anything. Your error indicates you have a decoding error while encoding, this usually indicates you are trying to encode data that is already encoded. - Martijn Pieters♦output_lines... surely ... can youprint output_linesright before you try to createoutput_string- Joran Beasleyoutput_linesis must longer so I shortened it - iqueqiorio