PyQt5-常见错误

错误一:调用open函数出现错误如下:
 

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

解决方式:在open方法指定参数encoding='UTF-8'

open('../test.qss', mode='r', encoding='UTF-8')

猜你喜欢

转载自blog.csdn.net/ifeng12358/article/details/102959690