UnicodeDecodeError: 'gbk' codec can't decode byte 0x8b in position 5680: illegal multibyte sequence
时间: 2023-10-29 20:37:00 浏览: 164
This error occurs when the Python interpreter tries to decode a string of bytes using the 'gbk' codec, but encounters a byte that is not a valid character in the 'gbk' encoding.
The byte 0x8b is a control character that is not defined in the 'gbk' encoding, which only supports characters in the range 0x00-0xff. This means that the string contains a byte sequence that is not compatible with the 'gbk' encoding.
To fix this error, you can try decoding the string using a different encoding that supports the byte sequence in question, or you can try to check the source of the string to see if there is an encoding issue. You can also use the 'utf-8' codec, which is a more universal encoding that supports a wider range of characters.
阅读全文