Recent version of ecommerce

I was recently looking at the recent master of ecommerce with Python 3 in order to check something with the SDK of our payment processor.

I was able to install it, migrate the database, check Oscar (/dashboard) but I do not have any views when I try to access the Course Administration Tool (/courses) or the coupons (/coupons).

Any ideas why it is not displaying the courses or the coupons? I can clearly see them if I go through the dashboard interface.

I do not necessarily want to wait until the first beta or release candidate of Juniper before encountering problems.

Thanks for your help.

And when on the /courses page, I don’t even see a “Create Course” bouton anymore…

I am progressing.

The version of nodejs on Ubuntu 16.04 is out of date. I had to install a more recent version following the instructions available at https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04

I had previously replaced “npm ci” command in the Makefile with “npm install” which was used in the past with ecommerce. Now, I am using “npm ci” and I definitely made some progress because the coupons page is accessible.

I still have an issue with the courses page but it is of a different nature now (it is a get_oauth_access_token issue now).

I guess the documentation for ecommerce needs to be updated to make sure a recent version of nodejs needs to be installed under Ubuntu 16.04.

While reading the ecommerce documentation, I discovered that the oauth2 client needed to be changed in order to use admin/oauth2_provider/application/ instead of admin/oauth2/client/

After following the instructions on https://edx-ecommerce.readthedocs.io/en/latest/install_ecommerce.html#configure-oauth and https://edx-ecommerce.readthedocs.io/en/latest/install_ecommerce.html#configure-a-site-partner-and-site-configuration I am able to launch the ecommerce version under Python 3.

Unfortunately, I am redirected to the oauth2 provider but after authenticating I end up with the following error messages:

Dec 5 11:58:16 ip-10-0-0-71 [service_variant=lms][root][env:sandbox] ERROR [ip-10-0-0-71 25718] [signals.py:21] - Uncaught exception from None
Traceback (most recent call last):
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
return func(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/edx-platform/openedx/core/djangoapps/oauth_dispatch/views.py”, line 55, in dispatch
return view(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/oauth2_provider/views/base.py”, line 37, in dispatch
return super(BaseAuthorizationView, self).dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/mixins.py”, line 56, in dispatch
return super(LoginRequiredMixin, self).dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/base.py”, line 88, in dispatch
return handler(request, *args, **kwargs)
File “/edx/app/edxapp/edx-platform/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py”, line 97, in get
return self.error_response(error)
TypeError: error_response() takes exactly 3 arguments (2 given)
Dec 5 11:58:16 ip-10-0-0-71 [service_variant=lms][django.request][env:sandbox] ERROR [ip-10-0-0-71 25718] [exception.py:135] - Internal Server Error: /oauth2/authorize
Traceback (most recent call last):
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
return func(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/edx-platform/openedx/core/djangoapps/oauth_dispatch/views.py”, line 55, in dispatch
return view(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/oauth2_provider/views/base.py”, line 37, in dispatch
return super(BaseAuthorizationView, self).dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/mixins.py”, line 56, in dispatch
return super(LoginRequiredMixin, self).dispatch(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/generic/base.py”, line 88, in dispatch
return handler(request, *args, **kwargs)
File “/edx/app/edxapp/edx-platform/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py”, line 97, in get
return self.error_response(error)
TypeError: error_response() takes exactly 3 arguments (2 given)

I am seriously wondering if there are incompatibilities between the version of oauth and django oauth toolkit used in Ironwood and expected from the Python 3 version of ecommerce. Anyone knows?

I am now tempted to wait until the first release of the Juniper Python 3 beta before trying any further. Unless someone has a solution to my problem?

Have a nice day.

I definitely needed to upgrade nodejs to a more recent release in order to use the “npm ci” instructions that are included in the Makefile.

I wasn’t able to configure an oauth2 application endpoint as specified in the “current” documentation. Nonetheless, I was able to use the key and secret generated by this new oauth2 application in a new oauth2 client as before and then it worked… Now I have a fairly recent version of ecommerce master running under Python 3 in our development environment.

I’ll call it a day for now but we will definitely need better instructions, maybe a real life example with keys every operators would need to change in their production environment, on how to setup the different keys, JWT or other variables that will be necessary for installing the different micro front ends in Juniper and going forward.

1 Like