gpt4 book ai didi

python - 值错误 : Unable to configure handler 'file' : [Errno 13] Permission denied:

转载 作者:太空宇宙 更新时间:2023-11-04 04:50:43 24 4
gpt4 key购买 nike

使用 Django 1.11 和 Python 2.7。

由于权限原因,我无法配置处理程序"file"。

回溯如下:

Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 337, in execute
django.setup()
File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 22, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/usr/local/lib/python2.7/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/config.py", line 794, in dictConfig
dictConfigClass(config).configure()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/config.py", line 576, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'file': [Errno 13] Permission denied: '/var/log/welnity/debug.log'

最佳答案

在你的项目所在的根盘的这个子目录(:/var/www/logs/projectname)下创建以下文件 例如,如果项目的名称是towns并且位于D盘,则转到驱动器D 并创建一个新文件夹 var 并在该 www 中记录项目名称。在我的例子中,D:/var/www/logs/towns 另外,确保这个路径可用

关于python - 值错误 : Unable to configure handler 'file' : [Errno 13] Permission denied:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48405330/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com