'module' object has no attribute 'basicConfig'

后端 未结 4 1679
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 00:38

I have the following code, copied from the Python manual:

import logging
LOG_FILENAME = \'example.log\'
logging.basicConfig(filename=LOG_FILENAME,level=loggi         


        
4条回答
  •  执笔经年
    2020-12-11 00:57

    Change your file name instead of logging.py absolutely it will work because I faced same problem after importing logging module name so don't give a logging name to your python file.

提交回复
热议问题