Richie Enabling Error in Fresh setup

Hi All,
I have installed Nutmeg Version with Tutor. I am facing issue with Richie enabling.
I have enabled discovery, ECommerce, Forum and notes plugin.
But they all are working fine
i have enable richie bye this command
tutor plugins enable richie
then tutor images build openedx
then tutor local quickstart
in quickstart i am getting this error


but in my site richie is showing but demo course i have created is not showing here.

i have again tried to run tutor local restart but not working same error again

This is complete error which i am getting

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/argparse.py", line 1787, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/lib/python3.7/argparse.py", line 1975, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/local/lib/python3.7/argparse.py", line 1952, in consume_positionals
    take_action(action, args)
  File "/usr/local/lib/python3.7/argparse.py", line 1845, in take_action
    argument_values = self._get_values(action, argument_strings)
  File "/usr/local/lib/python3.7/argparse.py", line 2386, in _get_values
    self._check_value(action, value[0])
  File "/usr/local/lib/python3.7/argparse.py", line 2433, in _check_value
    raise ArgumentError(action, msg % args)
argparse.ArgumentError: argument cmd: invalid choice: 'shell' (choose from 'chec                                                                                        k', 'copy', 'delete-orphaned-plugins', 'fix-tree', 'list', 'publisher-publish',                                                                                         'uninstall')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./sandbox/manage.py", line 14, in <module>
    execute_from_command_line(sys.argv)
  File "/app/venv/lib/python3.7/site-packages/django/core/management/__init__.py                                                                                        ", line 419, in execute_from_command_line
    utility.execute()
  File "/app/venv/lib/python3.7/site-packages/django/core/management/__init__.py                                                                                        ", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/app/venv/lib/python3.7/site-packages/django/core/management/base.py", l                                                                                        ine 348, in run_from_argv
    options = parser.parse_args(argv[2:])
  File "/app/venv/lib/python3.7/site-packages/django/core/management/base.py", l                                                                                        ine 61, in parse_args
    return super().parse_args(args, namespace)
  File "/usr/local/lib/python3.7/argparse.py", line 1755, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/lib/python3.7/argparse.py", line 1794, in parse_known_args
    self.error(str(err))
  File "/app/venv/lib/python3.7/site-packages/django/core/management/base.py", l                                                                                        ine 67, in error
    raise CommandError("Error: %s" % message)
django.core.management.base.CommandError: Error: argument cmd: invalid choice: '                                                                                        shell' (choose from 'check', 'copy', 'delete-orphaned-plugins', 'fix-tree', 'lis                                                                                        t', 'publisher-publish', 'uninstall')
Error: Command failed with status 1: docker-compose -f /home/user/.local/share/                                                                                        tutor/env/local/docker-compose.yml -f /home/user/.local/share/tutor/env/local/d                                                                                        ocker-compose.prod.yml -f /home/user/.local/share/tutor/env/local/docker-compos                                                                                        e.tmp.yml --project-name tutor_local run --rm richie ./sandbox/manage.py cms she                                                                                        ll -c from richie.sync import sync_all_courses; sync_all_courses()

I am so sorry for tagging you but since you are main developer in Richie. It is giving error.
@sampaccoud

I have exactly same issue and don’t know how to overcome this for last few days :frowning:

Its important to run tutor config save between those two steps.
Otherwise richie plugin wont be installed in the new Open edX built docker image

Hi Ghassan,
Thanks for replying

I have done that i am facing issue in course sync

Hi Ghassan,
Thanks for replying

I have done that i am facing issue in course sync.

The way I did syncing, suppose the Open edX and Richie are connected.

Is by creating a course page (in richie), and set the course code field to match the course code in Open edX . Now note that Open edX course Id contains Org, course code and course run. I don’t remeber the order but you just need to extract to use course code in richie only.

Thanks alot for reply Ghassan
i am not seeing any option in Richie for creating course. Please check your bug.

Please refer to this issue in richie.

Note: To acitave the wizard, first you login as an admin, in your_richie.com/admin and then go back your_richie.com and you shall see the wizard. In the screenshot above I don’t see the wizard.

Hello Dear @regis

We appreciate tremendous efforts put in by you and envy everything you have done for the community.

I have been trying to create programs in my Instance and tried various solutions for the same but i am somehow stuck.

The two major approach i have considered are creating programs through discovery and Richie plugin. However both the method have problems

While trying to use discovery there is a step of cache_program which always results in error.

While using Richie there is a step that syncs courses between Richie and lms during quickstart which always fails.

I haven’t been able to figure out who is maintaining that repo so i am pinging you here.

Could you please take a look and guide us what’s happening?

You response will be appreciated. I know I might have been come a cross annoying but that’s only because open edx is so vast and overwhelming. I am only trying to learn and use piece of code. Please help me figure this out.

Hello. I have the same error. This is pretty common I think. But wherever I go, no one seems to figure out what to do with it. I just simply followed the instructions of how to install the richie plugin as well. We would be glad if anyone could solve this anytime soon.

I was able to get richie working and synchronising on my local tutor instance.

I found all the information in the github issue and in the Readme of tutor-richie.

  1. Install and enable tutor-richie
  2. Don’t forget to rebuild the openedx image
  3. Create a superuser and log into admin panel of richie with your superuser
  4. Create an organisation
  5. Create a course
  6. Sync the data :tada:

Once you have your organisation(s) and the related course(s), you can run the sync command (see comment).

how did you perform the syncing of data? Also, does syncing of data remove the error indicated by @Parvinkumar about the attribute RICHIE_COURSE_HOOK?

I used tutor local init -l richie.

I’m not sure I understand what you mean here, are you referring to the first post?

As ghassan mentioned, it looks like an error that’s caused by not running tutor config save.

Well in my case, I ran “tutor config save” but the error keeps popping out. The same error as @Parvinkumar.

Also, regarding “tutor local init -l richie”, is there a reference where we can find this form of commands?

That would be such a huge help.

viber_image_2022-08-15_21-56-45-320

Hi @BbrSofiane ,
I have followed your all steps.
I have created few courses in Studio.
followed all steps i am getting error when i ( Install and enable tutor-richie, tutor config save, tutor images build all) start tutor local quickstart.

2022-08-17 13:17:34,988 WARNING 6 [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-17 13:17:35,015 WARNING 6 [py.warnings] [user None] [ip None] warnings.p                                                                                        y:109 - /openedx/venv/lib/python3.8/site-packages/botocore/vendored/requests/pac                                                                                        kages/urllib3/_collections.py:1: DeprecationWarning: Using or importing the ABCs                                                                                         from 'collections' instead of from 'collections.abc' is deprecated since Python                                                                                         3.3, and in 3.10 it will stop working
  from collections import Mapping, MutableMapping

2022-08-17 13:17:36,504 WARNING 6 [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-17 13:17:37,240 WARNING 6 [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') \

Traceback (most recent call last):
  File "./manage.py", line 106, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init_                                                                                        _.py", line 419, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init_                                                                                        _.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py                                                                                        ", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py                                                                                        ", line 398, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/command                                                                                        s/shell.py", line 87, in handle
    exec(options['command'], globals())
  File "<string>", line 1, in <module>
  File "/openedx/venv/src/richie-edx-platform/contrib/edx-platform/richie/sync.p                                                                                        y", line 20, in sync_all_courses
    sync_course(course)
  File "/openedx/venv/src/richie-edx-platform/contrib/edx-platform/richie/sync.p                                                                                        y", line 49, in sync_course
    settings.RICHIE_COURSE_HOOK["secret"].encode("utf-8"),
  File "/openedx/venv/lib/python3.8/site-packages/django/conf/__init__.py", line                                                                                         83, in __getattr__
    val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'RICHIE_COURSE_HOOK'
Error: Command failed with status 1: docker-compose -f /home/user/.local/share/                                                                                        tutor/env/local/docker-compose.yml -f /home/user/.local/share/tutor/env/local/d                                                                                        ocker-compose.prod.yml -f /home/user/.local/share/tutor/env/local/docker-compos                                                                                        e.tmp.yml --project-name tutor_local -f /home/user/.local/share/tutor/env/local                                                                                        /docker-compose.jobs.yml -f /home/user/.local/share/tutor/env/local/docker-comp                                                                                        ose.jobs.tmp.yml run --rm richie-openedx-job sh -e -c # Initial sync of course r                                                                                        uns
./manage.py cms shell -c "from richie.sync import sync_all_courses; sync_all_cou                                                                                        rses()"

I am getting this error when i run command ( Install and enable tutor-richie, tutor config save, tutor images build all) tutor local init -l richie.


2022-08-17 14:02:12,938 WARNING 7 [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-17 14:02:12,965 WARNING 7 [py.warnings] [user None] [ip None] warnings.p                                                                                        y:109 - /openedx/venv/lib/python3.8/site-packages/botocore/vendored/requests/pac                                                                                        kages/urllib3/_collections.py:1: DeprecationWarning: Using or importing the ABCs                                                                                         from 'collections' instead of from 'collections.abc' is deprecated since Python                                                                                         3.3, and in 3.10 it will stop working
  from collections import Mapping, MutableMapping

2022-08-17 14:02:14,282 WARNING 7 [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-17 14:02:15,024 WARNING 7 [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') \

Traceback (most recent call last):
  File "./manage.py", line 106, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init_                                                                                        _.py", line 419, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init_                                                                                        _.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py                                                                                        ", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py                                                                                        ", line 398, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/command                                                                                        s/shell.py", line 87, in handle
    exec(options['command'], globals())
  File "<string>", line 1, in <module>
  File "/openedx/venv/src/richie-edx-platform/contrib/edx-platform/richie/sync.p                                                                                        y", line 20, in sync_all_courses
    sync_course(course)
  File "/openedx/venv/src/richie-edx-platform/contrib/edx-platform/richie/sync.p                                                                                        y", line 49, in sync_course
    settings.RICHIE_COURSE_HOOK["secret"].encode("utf-8"),
  File "/openedx/venv/lib/python3.8/site-packages/django/conf/__init__.py", line                                                                                         83, in __getattr__
    val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'RICHIE_COURSE_HOOK'
Error: Command failed with status 1: docker-compose -f /home/user/.local/share/                                                                                        tutor/env/local/docker-compose.yml -f /home/user/.local/share/tutor/env/local/d                                                                                        ocker-compose.prod.yml -f /home/user/.local/share/tutor/env/local/docker-compos                                                                                        e.tmp.yml --project-name tutor_local -f /home/user/.local/share/tutor/env/local                                                                                        /docker-compose.jobs.yml -f /home/user/.local/share/tutor/env/local/docker-comp                                                                                        ose.jobs.tmp.yml run --rm richie-openedx-job sh -e -c # Initial sync of course r                                                                                        uns
./manage.py cms shell -c "from richie.sync import sync_all_courses; sync_all_cou                                                                                        rses()"