The back-end UnicodeDecodeError: ‘GBK’ codec can’t decode byte 0x80 in position 20: Illegal multibyte sequence UnicodeDecodeError: ‘GBK’ codec can’t decode byte 0x80 in position 20: Illegal multibyte sequence December 28, 2023 by Kiaan Ranganathan No Comments For example, my error is shown in the following figure: GBK encoder cannot decode byte 0x80 at position 20: illegal multi-byte sequence. Using the error message, we find the py file where the code resides: The encoding format is not specified when the file is opened with open. GBK is used by default, so this error occurs. Solution: Specify utF-8 encoding for open() : Perfect solution!