我在 ubuntu 服务器上安装了 open edx。我发现了这个错误:
TASK: [edxapp | syncdb and migrate] *******************************************
failed: [localhost] => (item=lms) => {"changed": true, "cmd": " /edx/app/edxapp/venvs/edxapp/bin/python manage.py lms syncdb --migrate --noinput --settings=aws_migrate ", "delta": "0:00:01.233541", "end": "2015-11-23 12:45:40.878404", "item": "lms", "rc": 1, "start": "2015-11-23 12:45:39.644863"}
stderr: Traceback (most recent call last):
File "manage.py", line 111, in <module>
startup = importlib.import_module(edx_args.startup)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/edx/app/edxapp/edx-platform/lms/startup.py", line 11, in <module>
settings.INSTALLED_APPS # pylint: disable=pointless-statement
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 113, in __init__
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
failed: [localhost] => (item=cms) => {"changed": true, "cmd": " /edx/app/edxapp/venvs/edxapp/bin/python manage.py cms syncdb --migrate --noinput --settings=aws_migrate ", "delta": "0:00:00.833513", "end": "2015-11-23 12:45:41.791966", "item": "cms", "rc": 1, "start": "2015-11-23 12:45:40.958453"}
stderr: Traceback (most recent call last):
File "manage.py", line 111, in <module>
startup = importlib.import_module(edx_args.startup)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/edx/app/edxapp/edx-platform/cms/startup.py", line 8, in <module>
settings.INSTALLED_APPS # pylint: disable=pointless-statement
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 113, in __init__
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
FATAL: all hosts have already failed -- aborting
我检查了 lms/envs/dev.py。该文件包含一个 SECRET_KEY 变量并且它不为空。我不知道要修复它