I try to read a .txt file, but get this strange error ...
Code:
def output_words(input_data):
with open('sendfile.txt', 'r') as f:
return f.read()
if __name__ == '__main__':
print(output_words("84f49b7ea92cc37031d87b3819126ae9deae251dae06c3f583dd15c2f198c066"))
Error:
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1911885: character maps to <undefined>