Exception "unhandled UnicodeDecodeError" 'gbk' codec can't decode byte 0x86 in position 47: illegal multibyte sequence

created at 06-29-2021 views: 9

description

The error when calling the open function is as follows:

Exception "unhandled UnicodeDecodeError"
'gbk' codec can't decode byte 0x86 in position 47: illegal multibyte sequence

Solution:

Specify the parameter encoding='UTF-8' in the open method

open('../test.qss', mode='r', encoding='UTF-8')
created at:06-29-2021
edited at: 06-29-2021: