Django makemessages命令抛出错误

时间:2014-11-26 15:16:46

标签: python django

当我尝试运行makemessages命令时,我遇到以下错误:

(bdm_app)bdm@bdm-VirtualBox:/webapps/bdm_app/bdm$ python manage.py makemessages -l nl
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/base.py", line 533, in handle
    return self.handle_noargs(**options)
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", line 283, in handle_noargs
    potfiles = self.build_potfiles()
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", line 299, in build_potfiles
    file_list = self.find_files(".")
  File "/webapps/bdm_app/local/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", line 358, in find_files
    ignored_roots = [os.path.normpath(p) for p in (settings.MEDIA_ROOT, settings.STATIC_ROOT)]
  File "/webapps/bdm_app/lib/python2.7/posixpath.py", line 342, in normpath
    initial_slashes = path.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

我使用virtualenv安装了django 1.7。有什么想法吗?

0 个答案:

没有答案