Enabling Programs in Open edX

Hi, We are new to open edx and we are facing some issues in enabling the programs in the LMS. As per my understanding programs are created in a separate service called the discovery service and for programs to appear in the LMS it needs to be enabled through programs api config. But when I go to the programs tab on the header and click on “Explore programs” its taking me to a completely irrelevant url. I guess this should be configuration mistake. But not sure how to go about fixing this.

Here are my screenshots:
LMS programs landing page:

Page after I click on "Explore programs"

My Programs Api config on lms:

I have two programs in my discovery service:

Any help, guidance or resources/tutorials are appreciated thanks.

@Sam_Joel
Hi Sam,
Have you able to find any solution for this i am also struck at this step.

try running those commands and see if it helps:

tutor local run discovery ./manage.py refresh_course_metadata --partner_code=openedx

tutor local run discovery ./manage.py update_index --disable-change-limit

tutor local run lms ./manage.py lms create_catalog_integrations --enabled
–internal_api_url=“”
–service_username=lms_catalog_service_user

tutor local run lms ./manage.py lms cache_programs

1 Like

Hi Edgar
Thanks for your reply i have tried the commands which u have given all 3 the commands working successfully but last cache_programs command giving following error

2022-08-03 06:04:03,507 WARNING 1 [py.warnings] [user None] [ip None] warnings.p                                                                                        y:109 - /openedx/venv/lib/python3.8/site-packages/boto/plugin.py:40: Deprecation                                                                                        Warning: the imp module is deprecated in favour of importlib; see the module's d                                                                                        ocumentation for alternative uses
  import imp

2022-08-03 06:04:04,822 WARNING 1 [py.warnings] [user None] [ip None] warnings.p                                                                                        y:109 - /openedx/edx-platform/openedx/core/types/admin.py:49: DeprecationWarning                                                                                        : Django 3.2+ available: the _admin_display method and the AdminMethodclass shou                                                                                        ld be removed from openedx.core.types
  warnings.warn(

2022-08-03 06:04:05,250 WARNING 1 [py.warnings] [user None] [ip None] warnings.p                                                                                        y:109 - /openedx/venv/lib/python3.8/site-packages/swiftclient/client.py:84: Depr                                                                                        ecationWarning: distutils Version classes are deprecated. Use packaging.version                                                                                         instead.
  if StrictVersion(requests.__version__) < StrictVersion('2.0.0') \

System check identified some issues:

WARNINGS:
?: (2_0.W001) Your URL pattern 'edx_name_affirmation/v1/verified_name/(?P<verifi                                                                                        ed_name_id>\d+)$' [name='verified_name_by_id'] has a route that contains '(?P<',                                                                                         begins with a '^', or ends with a '$'. This was likely an oversight when migrat                                                                                        ing to django.urls.path().
consent.DataSharingConsent.granted: (fields.W903) NullBooleanField is deprecated                                                                                        . Support for it (except in historical migrations) will be removed in Django 4.0                                                                                        .
        HINT: Use BooleanField(null=True) instead.
consent.HistoricalDataSharingConsent.granted: (fields.W903) NullBooleanField is                                                                                         deprecated. Support for it (except in historical migrations) will be removed in                                                                                         Django 4.0.
        HINT: Use BooleanField(null=True) instead.
2022-08-03 06:04:07,271 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:49 - populate-multit                                                                                        enant-programs switch is ON
2022-08-03 06:04:07,287 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:72 - Skipping site e                                                                                        xample.com. No configuration.
2022-08-03 06:04:07,294 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:147 - Requesting pro                                                                                        gram UUIDs for minischool.co.in.
2022-08-03 06:04:07,322 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:153 - Received 1 UUI                                                                                        Ds for site minischool.co.in
2022-08-03 06:04:07,322 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:165 - Requesting det                                                                                        ails for program 0943eb3c-ad98-4e8d-8c27-d6d543ee826f.
2022-08-03 06:04:07,343 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:182 - Requesting pat                                                                                        hways for minischool.co.in.
2022-08-03 06:04:07,361 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:196 - Received 0 pat                                                                                        hways for site minischool.co.in
2022-08-03 06:04:07,361 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:100 - Caching UUIDs                                                                                         for 1 programs for site minischool.co.in.
2022-08-03 06:04:07,362 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:107 - Caching ids fo                                                                                        r 0 pathways for site minischool.co.in.
2022-08-03 06:04:07,367 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:147 - Requesting pro                                                                                        gram UUIDs for minischool.co.in:8000.
2022-08-03 06:04:07,369 ERROR 1 [openedx.core.djangoapps.catalog.management.comm                                                                                        ands.cache_programs] [user None] [ip None] cache_programs.py:150 - Failed to ret                                                                                        rieve program UUIDs for site: minischool.co.in:8000.
Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 1                                                                                        74, in _new_conn
    conn = connection.create_connection(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/util/connection.py", l                                                                                        ine 95, in create_connection
    raise err
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/util/connection.py", l                                                                                        ine 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", li                                                                                        ne 703, in urlopen
    httplib_response = self._make_request(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", li                                                                                        ne 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 2                                                                                        39, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1256, in                                                                                         request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1302, in                                                                                         _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1251, in                                                                                         endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1011, in                                                                                         _send_output
    self.send(msg)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 951, in s                                                                                        end
    self.connect()
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 2                                                                                        05, in connect
    conn = self._new_conn()
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 1                                                                                        86, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object                                                                                         at 0x7efe48f29af0>: Failed to establish a new connection: [Errno 111] Connectio                                                                                        n refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/requests/adapters.py", line 44                                                                                        0, in send
    resp = conn.urlopen(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", li                                                                                        ne 785, in urlopen
    retries = retries.increment(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 5                                                                                        92, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='discovery.minischool.                                                                                        co.in', port=8381): Max retries exceeded with url: /api/v1/programs/?exclude_utm                                                                                        =1&status=active&status=retired&uuids_only=1 (Caused by NewConnectionError('<url                                                                                        lib3.connection.HTTPConnection object at 0x7efe48f29af0>: Failed to establish a                                                                                         new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/openedx/edx-platform/openedx/core/djangoapps/catalog/management/command                                                                                        s/cache_programs.py", line 148, in get_site_program_uuids
    uuids = client.programs.get(**querystring)
  File "/openedx/venv/lib/python3.8/site-packages/slumber/__init__.py", line 155                                                                                        , in get
    resp = self._request("GET", params=kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/slumber/__init__.py", line 97,                                                                                         in _request
    resp = self._store["session"].request(method, url, data=data, params=params,                                                                                         files=files, headers=headers)
  File "/openedx/venv/lib/python3.8/site-packages/requests/sessions.py", line 52                                                                                        9, in request
    resp = self.send(prep, **send_kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/requests/sessions.py", line 64                                                                                        5, in send
    r = adapter.send(request, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/requests/adapters.py", line 51                                                                                        9, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='discovery.minischo                                                                                        ol.co.in', port=8381): Max retries exceeded with url: /api/v1/programs/?exclude_                                                                                        utm=1&status=active&status=retired&uuids_only=1 (Caused by NewConnectionError('<                                                                                        urllib3.connection.HTTPConnection object at 0x7efe48f29af0>: Failed to establish                                                                                         a new connection: [Errno 111] Connection refused'))
2022-08-03 06:04:07,376 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:153 - Received 0 UUI                                                                                        Ds for site minischool.co.in:8000
2022-08-03 06:04:07,376 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:182 - Requesting pat                                                                                        hways for minischool.co.in:8000.
2022-08-03 06:04:07,378 ERROR 1 [openedx.core.djangoapps.catalog.management.comm                                                                                        ands.cache_programs] [user None] [ip None] cache_programs.py:191 - Failed to ret                                                                                        rieve pathways for site: minischool.co.in:8000.
Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 1                                                                                        74, in _new_conn
    conn = connection.create_connection(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/util/connection.py", l                                                                                        ine 95, in create_connection
    raise err
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/util/connection.py", l                                                                                        ine 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", li                                                                                        ne 703, in urlopen
    httplib_response = self._make_request(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", li                                                                                        ne 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 2                                                                                        39, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1256, in                                                                                         request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1302, in                                                                                         _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1251, in                                                                                         endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 1011, in                                                                                         _send_output
    self.send(msg)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/http/client.py", line 951, in s                                                                                        end
    self.connect()
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 2                                                                                        05, in connect
    conn = self._new_conn()
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 1                                                                                        86, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object                                                                                         at 0x7efe48ee7280>: Failed to establish a new connection: [Errno 111] Connectio                                                                                        n refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/openedx/venv/lib/python3.8/site-packages/requests/adapters.py", line 44                                                                                        0, in send
    resp = conn.urlopen(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", li                                                                                        ne 785, in urlopen
    retries = retries.increment(
  File "/openedx/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 5                                                                                        92, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='discovery.minischool.                                                                                        co.in', port=8381): Max retries exceeded with url: /api/v1/pathways/?exclude_utm                                                                                        =1&page=1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection obje                                                                                        ct at 0x7efe48ee7280>: Failed to establish a new connection: [Errno 111] Connect                                                                                        ion refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/openedx/edx-platform/openedx/core/djangoapps/catalog/management/command                                                                                        s/cache_programs.py", line 186, in get_pathways
    new_pathways = client.pathways.get(exclude_utm=1, page=next_page)
  File "/openedx/venv/lib/python3.8/site-packages/slumber/__init__.py", line 155                                                                                        , in get
    resp = self._request("GET", params=kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/slumber/__init__.py", line 97,                                                                                         in _request
    resp = self._store["session"].request(method, url, data=data, params=params,                                                                                         files=files, headers=headers)
  File "/openedx/venv/lib/python3.8/site-packages/requests/sessions.py", line 52                                                                                        9, in request
    resp = self.send(prep, **send_kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/requests/sessions.py", line 64                                                                                        5, in send
    r = adapter.send(request, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/requests/adapters.py", line 51                                                                                        9, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='discovery.minischo                                                                                        ol.co.in', port=8381): Max retries exceeded with url: /api/v1/pathways/?exclude_                                                                                        utm=1&page=1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection o                                                                                        bject at 0x7efe48ee7280>: Failed to establish a new connection: [Errno 111] Conn                                                                                        ection refused'))
2022-08-03 06:04:07,379 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:196 - Received 0 pat                                                                                        hways for site minischool.co.in:8000
2022-08-03 06:04:07,379 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:100 - Caching UUIDs                                                                                         for 0 programs for site minischool.co.in:8000.
2022-08-03 06:04:07,379 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:107 - Caching ids fo                                                                                        r 0 pathways for site minischool.co.in:8000.
2022-08-03 06:04:07,380 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:113 - Caching detail                                                                                        s for 1 programs.
2022-08-03 06:04:07,380 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:116 - Caching detail                                                                                        s for 0 pathways.
2022-08-03 06:04:07,381 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:119 - Caching progra                                                                                        ms uuids for 0 courses.
2022-08-03 06:04:07,381 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:122 - Caching progra                                                                                        ms uuids for 2 catalog courses.
2022-08-03 06:04:07,381 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:125 - Caching progra                                                                                        m UUIDs by 1 program types.
2022-08-03 06:04:07,382 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:128 - Caching progra                                                                                        m UUIDs by 1 program type slugs.
2022-08-03 06:04:07,382 INFO 1 [openedx.core.djangoapps.catalog.management.comma                                                                                        nds.cache_programs] [user None] [ip None] cache_programs.py:131 - Caching progra                                                                                        ms uuids for 0 organizations
Error: Command failed with status 1: docker-compose -f /home/manoj/.local/share/                                                                                        tutor/env/local/docker-compose.yml -f /home/manoj/.local/share/tutor/env/local/d                                                                                        ocker-compose.prod.yml -f /home/manoj/.local/share/tutor/env/local/docker-compos                                                                                        e.tmp.yml --project-name tutor_local run --rm lms ./manage.py lms cache_programs

When you add a programs api config you add the path /programs.
In my understanding, this path should be a valid page that will consume the Discovery API to show the Catalog, Programs, etc.

The Discovery is to manage these things (catalog, programs, etc) and not to show them. We have a basic Programs view in OpenedX, but only this I believe.

@Manoj_kumar @edgar.rezende @erickhgm @Sam_Joel ,

I have tried it there is no programs page currently in Nutmeg. you can see programs if they were a part of a course which you have subscribed. For that purpose use Riche or any marketing site.

In discovery in edx user add LMS path and cms path first and then try to run these commands it will work.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.