My Certificate Error

I am using Tutor Open edx version 19.0.5. I found that my certificates are not working. I encountered the message as shown in the image. When I checked the error logs, I found the following message

"2025-06-14 15:51:44,504 ERROR 53 [common.djangoapps.util.views] [user 4] [ip 49.228.96.83] views.py:148 - Error in django view.
Traceback (most recent call last):
  File "/openedx/edx-platform/common/djangoapps/util/views.py", line 139, in inner
    return func(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/openedx/venv/lib/python3.11/site-packages/edx_django_utils/plugins/pluggable_override.py", line 77, in wrapper
    return prev_fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/openedx/edx-platform/lms/djangoapps/certificates/views/webview.py", line 575, in render_html_view
    _update_certificate_context(context, course, course_overview, user_certificate, platform_name)
  File "/openedx/edx-platform/lms/djangoapps/certificates/views/webview.py", line 124, in _update_certificate_context
    context['certificate_date_issued'] = strftime_localized(date, settings.CERTIFICATE_DATE_FORMAT)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/openedx/edx-platform/common/djangoapps/util/date_utils.py", line 215, in strftime_localized
    formatted_date = re.sub(r"%-.|%.|%", process_percent_code, format)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/pyenv/versions/3.11.8/lib/python3.11/re/__init__.py", line 185, in sub
    return _compile(pattern, flags).sub(repl, string, count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/openedx/edx-platform/common/djangoapps/util/date_utils.py", line 180, in process_percent_code
    part = pgettext('month name', MONTHS[dtime.month])
                                         ^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'month'
2025-06-14 15:51:45,336 INFO 53 [edx.footer] [user 4] [ip 49.228.96.83] api.py:479 - images/logo.png
"

. What should I do next?

thank you

Hi @jira_chonraksuk

Ensure that you have configured the course schedule details correctly in the studio. I mean course start date, end date, etc.

2 Likes

Hi @jira_chonraksuk,
I encountered the same issue, and I was able to resolve it by following the solution provided in this link:

Thank you, everyone. My issue has been resolved. I found that I hadn’t set an end date for the course, which caused the error.

Best regards,