Error msg:
--- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.6/logging/__init__.py", line 993, in emit msg = self.format(record) File "/usr/lib/python3.6/logging/__init__.py", line 839, in format return fmt.format(record) File "/usr/lib/python3.6/logging/__init__.py", line 579, in format s = self.formatMessage(record) File "/usr/lib/python3.6/logging/__init__.py", line 548, in formatMessage return self._style.format(record) File "/usr/lib/python3.6/logging/__init__.py", line 391, in format return self._fmt % record.__dict__ TypeError: not enough arguments for format string Call stack: File "start.py", line 7, in <module> Engine().start() File "/home/hpcm/Desktop/spider/13-frame_spider/myscrapy/core/engine.py", line 45, in start logger.info("End time is [ {} ]".format(end)) Message: ‘End time is [ 2018-09-27 17:55:54.795786 ]‘ Arguments: ()
问题:
setting中的log使用的DEFAULT_LOG_FMT参数出错
解决:
检查参数是否写错, 或者多项少项
原文地址:https://www.cnblogs.com/hpcm/p/9779931.html
时间: 2024-10-10 16:48:32