'module' object has no attribute 'basicConfig'

后端 未结 4 1678
没有蜡笔的小新
没有蜡笔的小新 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:54

    I have faced the same attribute error while running and when checked with current working folder there are 2 filenames with logging. Delete those filenames or move to recycle bin or if imp move to different folder or change names for those logging files and run your program. It will work fine.

提交回复
热议问题