python read files error: UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x80 in position 205: illegal multibyte sequence
python read file warning: “UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x80 in position 205: illegal multibyte sequence”
Solution 1:
FILE_OBJECT= open('data.txt','r', encoding='UTF-8')
Solution 2:
FILE_OBJECT= open('data.txt','rb')
Similar Posts:
- [Solved] Python error: UnicodeDecodeError:’gbk’ codec can’t decode byte 0xb0 in position 166: illegal multibyte sequence
- [Solved] Pycharm Pytest Error: UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xaa in position 171: illegal multibyte sequence
- [Solved] Yaml Text Error: UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte : illegal multibyte sequence
- [Solved] Python Error: UnicodeDecodeError: ‘gb2312’ codec can’t decode byte 0xa4 in position… : illegal multibyte sequence
- Python Open File SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in …
- [Solved] UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x80 in position 128: illegal multibyte sequence
- [Solved] UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xa5 in position 1508: illegal multibyte sequence
- [Solved] Unicode decode error in the background when the robot framework is running
- python3 are installed through pip on Win 10, Unicode decodeerror: ‘UTF-8’ codec can’t decode byte
- [Solved] UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x89 in position 0: invalid start byte