'module' object has no attribute 'basicConfig'

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

    You've got another module called logging on the python path; probably a file logging.py in the same directory. Compare print logging.__file__.

提交回复
热议问题