Every time I need to run some command with manage.py I get an error message, any idea how to fix it?
1. I try to run:
aprendetecho@aprende:/edx/app/edxapp/edx-platform$ sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings production help
And I get:
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/lms/envs/production.py", line 43, in get_env_setting
return os.environ[setting]
File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/os.py", line 725, in __getitem__
raise KeyError(key) from None
KeyError: 'LMS_CFG'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./manage.py", line 119, in <module>
startup = importlib.import_module(edx_args.startup)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/edx/app/edxapp/edx-platform/lms/startup.py", line 10, in <module>
settings.INSTALLED_APPS # pylint: disable=pointless-statement
File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/conf/__init__.py", line 79, in __getattr__
self._setup(name)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/conf/__init__.py", line 66, in _setup
self._wrapped = Settings(settings_module)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/conf/__init__.py", line 157, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/edx/app/edxapp/edx-platform/lms/envs/production.py", line 65, in <module>
CONFIG_FILE = get_env_setting('LMS_CFG')
File "/edx/app/edxapp/edx-platform/lms/envs/production.py", line 46, in get_env_setting
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the LMS_CFG env variable
2. Then I tried this one:
aprendetecho@aprende:/edx/app/edxapp/edx-platform$ ./manage.py lms manage_user kike.ramirez kike.ramirez@techo.org --staff --superuser --settings=devstack
And got these:
Traceback (most recent call last):
File "./manage.py", line 17, in <module>
log_python_warnings()
File "/edx/app/edxapp/edx-platform/openedx/core/lib/logsettings.py", line 125, in log_python_warnings
warnings.filterwarnings('ignore', '.*unclosed.*', category=ResourceWarning)
NameError: global name 'ResourceWarning' is not defined
I have no idea what to do to fix it? Some help please!