I am getting a message 'ascii' codec can't encode character u'\xe9' when I am writing a string to my file, heres how I am writing my file
my_file = open(output_path, "w") my_file.write(output_string) my_file.close() I have been searching and found answers like this UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 7: ordinal not in range(128) and the first one didn't work and then this one I'm confused why I am encoding data I want to be able to read
import io f = io.open(filename, 'w', encoding='utf8') Thanks for the help
UnicodeEncodeError: 'ascii' codec can't encode character u'\x96' in position 62393: ordinal not in range(128)andUnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 343071: ordinal not in range(128)when I write my string to file