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

Delete courses #81

planesticud opened this issue Oct 11, 2018 · 5 comments


None yet
3 participants
Copy link

commented Oct 11, 2018

Hi, I am trying to delete a courses using this:

openedx@84c4dcdf0fb2:~/edx-platform$ ./ cms --settings=aws delete_orphans course-v1:UD+001+208_3/about   

but show this:

Traceback (most recent call last):
  File "./", line 118, in <module>
  File "/openedx/edx-platform/cms/", line 19, in run
  File "/usr/local/lib/python2.7/dist-packages/django/", line 22, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/", line 75, in configure_logging
  File "/usr/lib/python2.7/logging/", line 794, in dictConfig
  File "/usr/lib/python2.7/logging/", line 576, in configure
    '%r: %s' % (name, e))
ValueError: Unable to configure handler 'local': [Errno 2] No such file or directory

Thank you for your help.


This comment has been minimized.

Copy link

commented Oct 11, 2018

You should probably not use aws settings: as the name implies, they are made to run AWS, not inside a docker container.

Try instead to run without specifying the settings, which should be picked up from the DJANGO_SETTINGS_MODULE environment variable:

./ cms delete_orphans course-v1:UD+001+208_3/about

This comment has been minimized.

Copy link

commented Oct 11, 2018

Thank you very much
I could do it, whit this

 ./ cms delete_course course-v1:edX+DemoX+Demo_Course

This comment has been minimized.

Copy link

commented Oct 12, 2018

Good job! 👍

@regisb regisb closed this Oct 12, 2018


This comment has been minimized.

Copy link

commented May 21, 2019

is this still the accepted solution for deleting a course? if so could I get a little more description on the process?

in attempting to replicate this (tutor v3.3.4, and running a custom fork of the edx-platform branched from ironwood.master) :

  • i've started up portainer to gain access to the running containers
  • connected to both the lms & cms containers respectively attempting to run the delete_course command, but regardless when attempting to perform the described action am greeted by the following:

root@ab2c0efec7f6:/openedx/edx-platform# ./ cms delete_course course-v1:testing+1+2019


Traceback (most recent call last):
  File "./", line 123, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/", line 364, in execute_from_command_line
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/", line 356, in execute
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/",line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/",line 330, in execute
    output = self.handle(*args, **options)
  File "/openedx/edx-platform/cms/djangoapps/contentstore/management/commands/", line 69, in handle
    if not modulestore().get_course(course_key):
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/", line 316, in modulestore
    settings.MODULESTORE['default'].get('OPTIONS', {})
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/", line 298, in create_modulestore_instance
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/", line 176, in __init__
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/", line 298, in create_modulestore_instance
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/split_mongo/", line 707, in __init__
    self.db_connection = MongoConnection(**doc_store_config)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/split_mongo/", line 278, in __init__
    retry_wait_time=retry_wait_time, **kwargs
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/", line 50, in connect_to_mongodb
  File "/openedx/venv/local/lib/python2.7/site-packages/pymongo/", line 425, in __init__
    raise ConnectionFailure(str(e))
pymongo.errors.ConnectionFailure: [Errno 111] Connection refused

I've attempted to run this command from the following containers:

  • tutor_local_lms_1
  • tutor_local_cms_1
  • tutor_local_lms_worker_1
  • tutor_local_cms_worker_1

Additionally, I've tried activating the virtual environment before performing the operation as well.

I'm assuming this has something to do with how i'm attempting to perform the operation, would it be possible to get a little more detail as to how this is expected to be run?


This comment has been minimized.

Copy link

commented May 22, 2019

@crivet This is a different issue than the original one. Would you mind creating a new topic on the discussion forums?
It should work from the tutor_local_cms_1 container. It looks like the mongodb container cannot be reached. Please verify that the mongodb container is up and running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.