# Enable Automatic Certificate Generation is fail on Maple after Lilac upgrade

**URL:** <https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393>\
**Category:** Development\
**Tags:** certificates\
**Created:** [January 9, 2022, 12:25am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393 "2022-01-09T00:25:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwidyasanyata](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/bwidyasanyata/32/2926_2.png) [@bwidyasanyata](https://discuss.openedx.org/u/bwidyasanyata)\
**Post date:** [January 9, 2022, 12:25am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/1 "2022-01-09T00:25:47Z")

</div>

Hi,  
I have a problem on automatic certificate generation issue on Maple after upgrading from Lilac (with Tutor installation method).

On my previous Lilac, I can enabled a course automatic certificate generation by set the `early_no_info` value ([18.5. Ending a Course — Building and Running an Open edX Course documentation](https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/latest/student_progress/checking_student_progress.html#allow-learners-to-download-certificates)) and somehow this **Certificates Display Behavior** were disappear from Maple’s Course Advanced Settings.  
Secondly I then enabled `certificates.auto_certificate_generation` waffle switch on Django Admin.

Now if a learner go to Progress page it couldn’t be opened and show “There was an error loading this course.” error. Check on LMS log shown:

> lms\_1 | 2022-01-09 00:13:56,615 INFO 24 [lms.djangoapps.certificates.generation\_handler] [user 13] [ip 110.137.195.77] generation\_handler.py:44 - Attempt will be made to generate course certificate for user 13 : course-v1:CAx+CA102+2022\_T1  
> lms\_1 | 2022-01-09 00:13:56,665 INFO 24 [tracking] [user 13] [ip 110.137.195.77] logger.py:41 - {“name”: “edx.course.grade.now\_passed”, “context”: {“user\_id”: 13, “path”: “/api/course\_home/progress/course-v1:CAx+CA102+2022\_T1”, “course\_id”: “course-v1:CAx+CA102+2022\_T1”, “org\_id”: “CAx”, “enterprise\_uuid”: “”}, “username”: “billydekid”, “session”: “1e39b84da9b6dc60927266820518603d”, “ip”: “110.137.195.77”, “agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62”, “host”: “qa.cybersacademy.id”, “referer”: “[https://apps.qa.cybersacademy.id/](https://apps.qa.cybersacademy.id/)”, “accept\_language”: “en-US,en;q=0.9”, “event”: {“user\_id”: “13”, “course\_id”: “course-v1:CAx+CA102+2022\_T1”, “event\_transaction\_id”: “None”, “event\_transaction\_type”: “None”}, “time”: “2022-01-09T00:13:56.665331+00:00”, “event\_type”: “edx.course.grade.now\_passed”, “event\_source”: “server”, “page”: null}  
> lms\_1 | 2022-01-09 00:13:56,668 INFO 24 [lms.djangoapps.certificates.signals] [user 13] [ip 110.137.195.77] signals.py:80 - Attempt will be made to generate a course certificate for 13 : course-v1:CAx+CA102+2022\_T1 as a passing grade was received.  
> lms\_1 | 2022-01-09 00:13:56,670 INFO 24 [lms.djangoapps.certificates.generation\_handler] [user 13] [ip 110.137.195.77] generation\_handler.py:44 - Attempt will be made to generate course certificate for user 13 : course-v1:CAx+CA102+2022\_T1  
> lms\_1 | Fatal Python error: Cannot recover from stack overflow.  
> lms\_1 | Python runtime state: initialized  
> lms\_1 |  
> lms\_1 | Thread 0x00007fceb2ede700 (most recent call first):  
> lms\_1 | File “/openedx/venv/lib/python3.8/site-packages/pymongo/periodic\_executor.py”, line 131 in \_run  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 870 in run  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 932 in \_bootstrap\_inner  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 890 in \_bootstrap  
> lms\_1 |  
> lms\_1 | Thread 0x00007fceb36df700 (most recent call first):  
> lms\_1 | File “/openedx/venv/lib/python3.8/site-packages/pymongo/periodic\_executor.py”, line 131 in \_run  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 870 in run  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 932 in \_bootstrap\_inner  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 890 in \_bootstrap  
> lms\_1 |  
> lms\_1 | Thread 0x00007fcecda2a700 (most recent call first):  
> lms\_1 | File “/openedx/venv/lib/python3.8/site-packages/pymongo/periodic\_executor.py”, line 131 in \_run  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 870 in run  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 932 in \_bootstrap\_inner  
> lms\_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/threading.py”, line 890 in \_bootstrap

I should disabled the `certificates.auto_certificate_generation` waffle switch flag to fix this and page will display normally. But, no certificate download link on this page when a learner has passed the exam.

I know there are some various [bugs fixed and updates of Certificate on Maple](https://edx.readthedocs.io/projects/open-edx-release-notes/en/latest/maple.html#certificates) version but since I’m new and have no more deep knowledge in this area.

I really appreciate if someone could assist me on this issue.  
Thank you in advance.

[bayu]

---

<div class="post-metadata">

**Author:** ![Zia\_Fazal](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/zia_fazal/32/2259_2.png) [@Zia\_Fazal](https://discuss.openedx.org/u/Zia_Fazal)\
**Post date:** [January 10, 2022, 7:50am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/2 "2022-01-10T07:50:25Z")

</div>

This issue seems duplicate of [this](https://discuss.openedx.org/t/students-can-enter-some-classes-but-not-others-after-maple-upgrade-manual-course-certificate-generation-seems-to-cause-python-stack-overflow-lms-core-dump/6379) one

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [January 10, 2022, 8:35am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/3 "2022-01-10T08:35:39Z")

</div>

> [@bwidyasanyata](#):
>
> lms\_1 | Fatal Python error: Cannot recover from stack overflow.

Now this is an ominous error. Is there anything interesting in the logs of other containers?

---

<div class="post-metadata">

**Author:** ![bwidyasanyata](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/bwidyasanyata/32/2926_2.png) [@bwidyasanyata](https://discuss.openedx.org/u/bwidyasanyata)\
**Post date:** [January 10, 2022, 10:24am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/4 "2022-01-10T10:24:34Z")

</div>

Hi @Zia_Fazal it’s solved!  
By enabling persistent grades via Django admin.

But the link for Certificate download is still not appear.

 ![nocertdownload](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/6/6555caf7284d89dc501a050e2178e65462652ded.jpeg)

Thank you so much!

---

<div class="post-metadata">

**Author:** ![bwidyasanyata](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/bwidyasanyata/32/2926_2.png) [@bwidyasanyata](https://discuss.openedx.org/u/bwidyasanyata)\
**Post date:** [January 10, 2022, 10:32am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/5 "2022-01-10T10:32:19Z")

</div>

@regis , I will check…

---

<div class="post-metadata">

**Author:** ![bwidyasanyata](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/bwidyasanyata/32/2926_2.png) [@bwidyasanyata](https://discuss.openedx.org/u/bwidyasanyata)\
**Post date:** [January 23, 2022, 12:03am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/6 "2022-01-23T00:03:00Z")

</div>

Hi,

I will update and summarize what I’ve done so far (enable automatic certificate generation and allow learner to download early certificate)

Lilac:

1. Enabled `certificates.auto_certificate_generation` waffle switch on Django Admin
2. Set **Certificates Display Behavior** to `"early_no_info"`

Upgrade to Maple:

1. Error log regarding generate course certificate which will affect page loading error is fixed by enabling persistent grades on Django admin.
2. No “View Certificate” button on Progress’ learner page
3. Problem #2 is fixed by adding the course ID to certificate generation course setting on Django Admin (/admin/certificates/certificategenerationcoursesetting). The result is a “Request Certificate” button appears on Progress page.
4. “Request Certificate” button is still not up to my expectations where in lilac the “View Certificate” button appears. Hence no more step for learner to download his/her certificate.
5. I found that there is no **Certificates Display Behavior** on Maple course’s Advanced Settings, but now that “option” appears on Course Details page (Settings \> Schedule & Details) with the default value `end`.
6. I know that to allow learner to download early certificates is by set the Certificate Display Behavior to `early_no_info` on Certificates Display Behavior setting.
7. By doing the trick to change the `end` value to `early_no_info` on Course Details page fix #4 issue. The “Request Certificate” button is not show up replace with “View Certificate”.

 ![Certificates Display Behavior on Maple](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/4/4b7f782898e384bba4a26c32ef028ec8f6485525.jpeg)

Questions:

1. Is there any steps I missed?
2. Can these steps (“tricky”) be a workable solution at this time? Since the Maple documentation regarding this subject is still refer to Lilac.

Regards,

---

<div class="post-metadata">

**Author:** ![oanhcuongdo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/oanhcuongdo/32/3351_2.png) [@oanhcuongdo](https://discuss.openedx.org/u/oanhcuongdo)\
**Post date:** [March 2, 2022, 4:49am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/7 "2022-03-02T04:49:07Z")

</div>

> [@bwidyasanyata](#):
>
> **Certificates Display Behavior**

hi, i don’t see " **Certificates Display Behavior** as your comments and in Advance setting? Do you have any update?

---

<div class="post-metadata">

**Author:** ![bwidyasanyata](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/bwidyasanyata/32/2926_2.png) [@bwidyasanyata](https://discuss.openedx.org/u/bwidyasanyata)\
**Post date:** [March 2, 2022, 6:07am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/8 "2022-03-02T06:07:29Z")

</div>

Hi @oanhcuongdo, the **Certificates Display Behavior** on **Maple** is appear on **Course Details Page** (Schedule & Details).

Thank you,

---

<div class="post-metadata">

**Author:** ![oanhcuongdo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/oanhcuongdo/32/3351_2.png) [@oanhcuongdo](https://discuss.openedx.org/u/oanhcuongdo)\
**Post date:** [March 2, 2022, 6:20am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/9 "2022-03-02T06:20:10Z")

</div>

thánks for your replay. But i come to that page, no Certificates behavior ☹

---

<div class="post-metadata">

**Author:** ![bwidyasanyata](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/bwidyasanyata/32/2926_2.png) [@bwidyasanyata](https://discuss.openedx.org/u/bwidyasanyata)\
**Post date:** [March 2, 2022, 6:24am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/10 "2022-03-02T06:24:53Z")

</div>

What version are you using? If the course created on Lilac and you upgrade to Maple, it will not display. Try to create a new one on Maple. Thanks,

---

<div class="post-metadata">

**Author:** ![oanhcuongdo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/oanhcuongdo/32/3351_2.png) [@oanhcuongdo](https://discuss.openedx.org/u/oanhcuongdo)\
**Post date:** [March 2, 2022, 6:25am UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/11 "2022-03-02T06:25:53Z")

</div>

Thanks you. I create new one and it’s working. if I updated old one, nothing works

---

<div class="post-metadata">

**Author:** ![sambapete](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sambapete/32/4100_2.png) [@sambapete](https://discuss.openedx.org/u/sambapete)\
**Post date:** [March 17, 2022, 5:16pm UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/12 "2022-03-17T17:16:10Z")

</div>

I confirm that even importing an old course doesn’t work.

How do we handle courses that have been existing for a while, for example on Koa in Native, when we will switch to Tutor and Maple? We have long running courses that deliver certificates either auto-generated or at the end. Is there a migration command we need to run? We can’t assume a course will end before our move to Tutor. That would be a logistic nightmare…

---

<div class="post-metadata">

**Author:** ![mgmdi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mgmdi/32/1684_2.png) [@mgmdi](https://discuss.openedx.org/u/mgmdi)\
**Post date:** [March 24, 2022, 4:26pm UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/13 "2022-03-24T16:26:21Z")

</div>

Hi there, I’m reviewing this [PR](https://github.com/openedx/edx-platform/pull/29792) and after researching for a bit I came across this post. Maybe that PR solves this issue? If it’s completely unrelated, please, ignore this comment.

---

<div class="post-metadata">

**Author:** ![sambapete](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sambapete/32/4100_2.png) [@sambapete](https://discuss.openedx.org/u/sambapete)\
**Post date:** [March 24, 2022, 6:33pm UTC](https://discuss.openedx.org/t/enable-automatic-certificate-generation-is-fail-on-maple-after-lilac-upgrade/6393/14 "2022-03-24T18:33:10Z")

</div>

Hello Maria,

I hadn’t seen that PR and it definitely looks like the same problem I encountered recently. Nice catch. Thanks for forwarding this to me.

We had already decided to turn on Persistent Grades in the future (definitely before we move from Koa under Native to Maple or Nutmeg under Tutor), but it is great to understand what was going on. Thank you.
