Error while rendering on the paid course page after change default currency on ecommerce


I needed to change the ecommerce currency of my tutor (juniper) instance.

I changed the configuration in the file:


When restarting the installation it is no longer possible to open the page about the courses (where the purchase option is)

The following error appears in the log

lms_1               | Traceback (most recent call last):
rabbitmq_1          | closing AMQP connection <0.750.0> ( ->, vhost: '/', user: 'guest')
lms_1               |   File "/openedx/venv/lib/python3.5/site-packages/django/core/handlers/", line 34, in inner
lms_1               |     response = get_response(request)
lms_1               |   File "/openedx/venv/lib/python3.5/site-packages/django/core/handlers/", line 115, in _get_response
lms_1               |     response = self.process_exception_by_middleware(e, request)
lms_1               |   File "/openedx/venv/lib/python3.5/site-packages/django/core/handlers/", line 113, in _get_response
lms_1               |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms_1               |   File "/opt/pyenv/versions/3.5.9/lib/python3.5/", line 30, in inner
lms_1               |     return func(*args, **kwds)
lms_1               |   File "/openedx/venv/lib/python3.5/site-packages/django/utils/", line 142, in _wrapped_view
lms_1               |     response = view_func(request, *args, **kwargs)
lms_1               |   File "/openedx/edx-platform/common/djangoapps/util/", line 46, in inner
lms_1               |     response = view_func(request, *args, **kwargs)
lms_1               |   File "/openedx/edx-platform/common/djangoapps/util/", line 84, in wrapper
lms_1               |     response = view_func(request, *args, **kwargs)
lms_1               |   File "/openedx/edx-platform/lms/djangoapps/courseware/views/", line 931, in course_about
lms_1               |     registration_price, course_price = get_course_prices(course)
lms_1               |   File "/openedx/edx-platform/common/djangoapps/course_modes/", line 855, in get_course_prices
lms_1               |     settings.PAID_COURSE_REGISTRATION_CURRENCY[0]
lms_1               |   File "/openedx/edx-platform/common/djangoapps/course_modes/", line 770, in min_course_price_for_currency
lms_1               |     return min(mode.min_price for mode in modes if mode.currency.lower() == currency.lower(),default=0)
lms_1               | ValueError: min() arg is an empty sequence
lms_1               | - - [29/Sep/2020:23:28:22 +0000] "GET /courses/course-v1:UFMT+TAP1+2020ED1/about HTTP/1.0" 500 10113 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36"

Are there any further steps that should be taken after changing the currency of an EDX instance?


I solved the problem. Adding PAID_COURSE_REGISTRATION_CURRENCY and currency ISO symbol and id on lms.env.json

I made a tutor plugin to do this

Hi @ejklock! This looks like a bug. Thanks for identifying it and providing the solution :slight_smile: It will be fixed in the next release of the ecommerce plugin (v10.1.6).