I am a beginner in Python 3 and was trying out this program to read a file. The word files (.docx) is saved in the same directory as the program. I am getting the following error:
Traceback (most recent call last):
File "C:/Users/satya/PycharmProjects/pythonProject/Readingfile.py", line 2, in <module>
print(review.readline())
File "H:\Anaconda\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 637: character maps to <undefined>
review = open("ANOTHER ROUND.docx", 'r')
print(review.readline())
review.close()