Create superuser error in devstack

Hi everyone,

I’ve just finished installing devstack on workstation. Seem there is no superuser created in installation.
I tried to create a new superuser with following command.
./manage.py lms manage_user admin admin@example.com --staff --superuser --settings=devstack

But an error is thrown out, any idea to overcome this.

WARNING:py.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:7: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
  warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)

Traceback (most recent call last):
  File "./manage.py", line 120, in <module>
    startup.run()
  File "/edx/app/edxapp/edx-platform/lms/startup.py", line 21, in run
    django.setup()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 22, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/log.py", line 75, in configure_logging
    logging_config_func(logging_settings)
  File "/usr/lib/python2.7/logging/config.py", line 794, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib/python2.7/logging/config.py", line 576, in configure
    '%r: %s' % (name, e))
ValueError: Unable to configure handler 'local': [Errno 2] No such file or directory

@phucsystem, you likely have to specify the settings module when calling ./manage.py, and you’ll also have to ensure you’re in the correct virtualenv for the edxapp.

There is also a simpler management command for what you’re trying to do called set_superuser.

There are handy links for the manage.py scripts for each service available in /edx/bin.
I like to call management commands like so:

sudo -Hsu edxapp /edx/bin/{python,manage}.edxapp lms --settings=devstack_docker set_superuser admin@example.com
1 Like