PDF certificate generation error in Koa.master

Hello Everyone,

I am trying to generate a PDF certificate in Koa.master, I have not enabled HTML certificate type. I am getting the following error messages in logs.

2021-10-05 15:12:45,438 INFO 29089 [certificates: main] certificate_agent.py:106 - Generating certificate for b’ayernitin’ (b’Nitin Ayer’), in b’course-v1:IITBombayX+TC102x+2021’, with grade Pass
2021-10-05 15:12:45,441 CRITICAL 29089 [certificates: main] certificate_agent.py:143 - An error occurred during certificate generation (ayernitin course-v1:IITBombayX+TC102x+2021) <class ‘TypeError’>: ord() expected string of length 1, but int found: certificate_agent.py:117
2021-10-05 15:12:45,483 INFO 29089 [openedx_certificates.queue_xqueue] queue_xqueue.py:99 - Response: {“return_code”: 0, “content”: “”}

Following are the command I have used to generate the certificate:
sudo su edxapp -s /bin/bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
./manage.py lms --settings production regenerate_user -u ayernitin@gmail.com -c course-v1:IITBombayX+TC102x+2021 --insecure

I also have one question, If I enable the HTML certificate type, can generate PDF certificate type for select few courses?