I receiving a 403 error below when the LMS is trying to execute the 
/edx-platform/openedx/core/djangoapps/catalog/management/commands/
*cache_programs.py* application below.

2018-10-01 14:16:50,967 INFO 14191 
[openedx.core.djangoapps.catalog.management.commands.cache_programs] 
cache_programs.py:99 - Requesting program UUIDs.
2018-10-01 14:16:59,001 INFO 14191 
[requests.packages.urllib3.connectionpool] connectionpool.py:207 - Starting 
new HTTP connection (1): courses.localhost
2018-10-01 14:17:31,160 ERROR 14191 
[openedx.core.djangoapps.catalog.management.commands.cache_programs] 
cache_programs.py:102 - Failed to retrieve program UUIDs.
Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/.pycharm_helpers/pydev/pydevd.py", 
line 1664, in <module>
    main()
  File "/edx/app/edxapp/edx-platform/.pycharm_helpers/pydev/pydevd.py", 
line 1658, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/edx/app/edxapp/edx-platform/.pycharm_helpers/pydev/pydevd.py", 
line 1068, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "./manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File 
"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 354, in execute_from_command_line
    utility.execute()
  File 
"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File 
"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 445, in execute
    output = self.handle(*args, **options)
  File 
"/edx/app/edxapp/edx-platform/openedx/core/djangoapps/catalog/management/commands/cache_programs.py",
 
line 100, in handle
    uuids = client.programs.get(**querystring)
  File 
"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/slumber/__init__.py",
 
line 155, in get
    resp = self._request("GET", params=kwargs)
  File 
"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/slumber/__init__.py",
 
line 101, in _request
    raise exception_class("Client Error %s: %s" % (resp.status_code, url), 
response=resp, content=resp.content)
slumber.exceptions.HttpClientError: Client Error 403: 
http://courses.localhost:18381/api/v1/programs/

I created a Program Type and Program at 

curl -X GET --header '{"Authorization": "Bearer 
eyJhbGciOiJIUzI1NiJ9I.eyJzY29wZXMiOiBbImVtYWlsIiwgInByb2ZpbGUiXSwgImFkbWluaXN0cmF0b3IiOiB0cnVlLCAiYXVkIjogImxtcy1rZXkiLCAiZmFtaWx5X25hbwMC9vYXV0aDIiLCAicHJlZmVycmVkX3VzZXJuYW1lIjogImxtc19jYXRhbG9nX3NlcnZpY2VfdXNlciIsICJuYW1lIjogIkxNUyBDYXRhbG9nIFNlcnZpY2UgVXNlciIsICJnaXZlbl9uYW1lIjogIiIsICJleHAiOiAxNTM4NDI1NzMxLCAiaWF0IjogMTUzODQyMjEzMSwgImVtYWlsIjogImxtc19jYXRhbG9nX3NlcnZpY2VfdXNlckBlZHVjYXRld29ya2ZvcmNlLmNvbSIsICJzdWIiOiAiZDM5ZTQyNGE3M2ZiNDlhZjk0NjZhZWUxMDUwZmQ2YjYifQ.mG3F1ljXdaKE69hS7a3-bHu16WP6sfux1WgHQs01WYs",
 
"Accept: application/json"}' 
'http://courses.localhost:18381/api/v1/programs/'


Receiving the following error.

{
    "detail": "Authentication credentials were not provided."
}

Can anyone help out with this?

Zach

-- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/92b98a00-3090-4b2d-861a-4e796be97e64%40googlegroups.com.

Reply via email to