从学院地址:https://ceshiren.com/t/topic/13564,
拷贝配置文件 logging.conf练习报错
UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xab in position 492: illegal multibyte sequence
在log实例化那里加上utf-8的配置项
logging.config.fileConfig(‘logging.conf’,disable_existing_loggers=False, encoding=‘UTF-8’)
我python3.9的fileConfig没有encoding参数,报错fileConfig() got an unexpected keyword argument ‘encoding’。
看了下,应该要升级python到3.10或者以上版本。我先升级python版本再试试