Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行命令python manage.py时出现问题 #2

Open
last2win opened this issue Feb 28, 2018 · 1 comment
Open

运行命令python manage.py时出现问题 #2

last2win opened this issue Feb 28, 2018 · 1 comment

Comments

@last2win
Copy link

root@VM-73-203-debian:~/blogs/MingBlog-master# python manage.py 
Traceback (most recent call last):
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/config.py", line 558, in configure
    handler = self.configure_handler(handlers[name])
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/config.py", line 731, in configure_handler
    result = factory(**kwargs)
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/handlers.py", line 150, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/handlers.py", line 57, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/__init__.py", line 1030, in __init__
    StreamHandler.__init__(self, self._open())
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/__init__.py", line 1059, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/root/blogs/MingBlog-master/log/all.log'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/site-packages/django/__init__.py", line 17, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/site-packages/django/utils/log.py", line 71, in configure_logging
    logging_config_func(logging_settings)
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/config.py", line 795, in dictConfig
    dictConfigClass(config).configure()
  File "/root/.pyenv/versions/anaconda3-5.1.0/lib/python3.6/logging/config.py", line 566, in configure
    '%r: %s' % (name, e))
ValueError: Unable to configure handler 'default': [Errno 2] No such file or directory: '/root/blogs/MingBlog-master/log/all.log'
@elliotxx
Copy link
Owner

可以检查下是否是用户权限冲突,或者手动创建下 log 文件夹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants