无法配置处理程序“文件”

执行:python manage.py makemigrations

报错:ValueError:无法配置处理程序“文件”

报错内容

Traceback (most recent call last):
  File "manage.py", line 22, in 
    execute_from_command_line(sys.argv)
  File "D:\anaconda3\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "D:\anaconda3\lib\site-packages\django\core\management\__init__.py", line 357, in execute
    django.setup()
  File "D:\anaconda3\lib\site-packages\django\__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "D:\anaconda3\lib\site-packages\django\utils\log.py", line 76, in configure_logging
    logging_config_func(logging_settings)
  File "D:\anaconda3\lib\logging\config.py", line 800, in dictConfig
    dictConfigClass(config).configure()
  File "D:\anaconda3\lib\logging\config.py", line 571, in configure
    '%r' % name) from e
ValueError: Unable to configure handler 'file'

解决办法

在项目根目录(包含manage.py的文件夹)中添加:“ logs”文件夹

你可能感兴趣的:(python)