To give you a background on what we have accomplished, our server was from native. We’ve gradually migrated it into tutor up to its latest version (currently Olive).
After that, we’ve attempted to activate the ecommerce plugin. And then we’ve encountered some error indicated here.
But now we’ve manged to fix the ecommerce error and installed it successfully. Upon checking our server, we noticed that some of our courses kept having a 500 error
as the image below.
Using the command tutor local logs --tail=100 -f
, We’ve ran through this error.
lms_1 | 2023-03-08 05:28:50,069 ERROR 6 [root] [user None] [ip None] signals.py:22 - Uncaught exception from None
lms_1 | Traceback (most recent call last):
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
lms_1 | response = get_response(request)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
lms_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
lms_1 | response = view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/common/djangoapps/util/views.py", line 43, in inner
lms_1 | response = view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/common/djangoapps/util/cache.py", line 90, in wrapper
lms_1 | return view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/views/views.py", line 810, in course_about
lms_1 | registration_price, course_price = get_course_prices(course) # lint-amnesty, pylint: disable=unused-variable
lms_1 | File "/openedx/edx-platform/common/djangoapps/course_modes/models.py", line 860, in get_course_prices
lms_1 | registration_price = CourseMode.min_course_price_for_currency(
lms_1 | File "/openedx/edx-platform/common/djangoapps/course_modes/models.py", line 777, in min_course_price_for_currency
lms_1 | return min(mode.min_price for mode in modes if mode.currency.lower() == currency.lower())
lms_1 | ValueError: min() arg is an empty sequence
lms_1 | 2023-03-08 05:28:50,124 ERROR 6 [django.request] [user 149781] [ip 112.206.98.235] log.py:224 - Internal Server Error: /courses/course-v1:Coursebank+GD005+2023_Q1/about
lms_1 | Traceback (most recent call last):
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
lms_1 | response = get_response(request)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
lms_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
lms_1 | response = view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/common/djangoapps/util/views.py", line 43, in inner
lms_1 | response = view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/common/djangoapps/util/cache.py", line 90, in wrapper
lms_1 | return view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/views/views.py", line 810, in course_about
lms_1 | registration_price, course_price = get_course_prices(course) # lint-amnesty, pylint: disable=unused-variable
lms_1 | File "/openedx/edx-platform/common/djangoapps/course_modes/models.py", line 860, in get_course_prices
lms_1 | registration_price = CourseMode.min_course_price_for_currency(
lms_1 | File "/openedx/edx-platform/common/djangoapps/course_modes/models.py", line 777, in min_course_price_for_currency
lms_1 | return min(mode.min_price for mode in modes if mode.currency.lower() == currency.lower())
lms_1 | ValueError: min() arg is an empty sequence
caddy_1 | {"level":"error","ts":1678253330.2076666,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"112.206.98.235","remote_port":"48642","proto":"HTTP/2.0","method":"GET","host":"tmtg-clone.click","uri":"/courses/course-v1:Coursebank+GD005+2023_Q1/about","tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"tmtg-clone.click"}},"user_id":"","duration":0.211037908,"size":3277,"status":500}
lms_1 | [pid: 6|app: 0|req: 130/425] 172.19.0.6 () {62 vars in 2698 bytes} [Wed Mar 8 05:28:49 2023] GET /courses/course-v1:Coursebank+GD005+2023_Q1/about => generated 9903 bytes in 210 msecs (HTTP/1.1 500) 7 headers in 523 bytes (1 switches on core 0)
We’ve spent a couple of days resolving this issue but sad to say, we haven’t progressed ever since. I need assistance from veterans.