时间:2021-07-01 10:21:17 帮助过:64人阅读
Traceback (most recent call last):
File "d:\python27\lib\logging\__init__.py", line 884, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'gbk' codec can't decode bytes in position 1274-1275: illegal multibyte sequence
Logged from file scraper.py, line 158
各种尝试均告失败,后来在论坛中发现有人说这个bug在python3环境不存在,于是尝试升级python2.7的logging组件。
Shell代码
pip install --upgrade logging
升级logging后再无此报错出现。