TypeError: not enough arguments for format string
Posted hpcm
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TypeError: not enough arguments for format string相关的知识,希望对你有一定的参考价值。
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参数出错
解决:
检查参数是否写错, 或者多项少项
以上是关于TypeError: not enough arguments for format string的主要内容,如果未能解决你的问题,请参考以下文章
当它在 Python 中显示“TypeError: not enough arguments for format string”时有啥建议吗?
关于Uncaught TypeError: nt.setState.bind is not a function报错解决
为啥我得到一个 TypeError: PySide2.QtCore.QStringListModel.setData(): no enough arguments
gatling压力测试工具启动gatling.bat命令行窗口报Error occurred during initialization of VM Could not reserve enough
create-react-app安装storybook报错typeError: args.flat is not a function