UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xa1 in position 3: invalid start byte

PyCharm project execution error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 3: invalid start byte

As shown in the figure below:
Insert picture description here
Save the .txt file used in the program as utf-8 encoding, as shown in the figure below:
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47542175/article/details/114135999