Certificate button "download" doesn't appear on student dashboard

326 views
Skip to first unread message

Saikou Balde

unread,
Oct 19, 2015, 10:27:43 AM10/19/15
to Open edX operations

Hello guys,

I have a Cypress Fullstack installed on Ubuntu 14

While I generate a certificate for a single user, the "download certificate" button doesn't appear onto the dashboard. See the attached screeshot.

I use the following command to generate to certificate for a single user.

"./manage.py lms --settings aws regenerate_user -u ho...@example.com -c course-v1:edX+DemoX+Demo_Course --insecure"

Here is what I see inside the "edx.log"

template = lookup_template(namespace, template_name)

File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/paths.py", line 80, in lookup_template
return LOOKUP[namespace].get_template(name)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/lookup.py", line 245, in get_template
return self.load(srcfile, uri)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/lookup.py", line 311, in load
**self.template_args)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 321, in __init

module = self.compile_from_file(path, filename)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 379, in compile_from_file
module = compat.load_module(self.module_id, path)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/compat.py", line 58, in load_module
fp = open(path, 'rb')
Exception: cannot create LoncapaProblem block-v1:edX+DemoX+Demo_Course+type@problem+block@ex_practice_2: [Errno 13] Permission denied: '/tmp/mako_lms/35b4de82addd2666f931e3dcd3a9da25/textline.html.py'
Oct 19 15:46:48 vps199556 [service_variant=lms][xmodule.x_module][env:sandbox] ERROR [vps199556 4906] [x_module.py:1141] - Error creating xmodule
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1129, in _xmodule
for_parent=self.get_parent() if self.has_cached_parent else None
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 635, in construct_xblock_from_class
args, *kwargs
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/capa_module.py", line 48, in __init

super(CapaModule, self).init(args, *kwargs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/capa_base.py", line 230, in init
self.lcp = self.new_lcp(self.get_state_for_lcp())
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/capa_base.py", line 322, in new_lcp
capa_module=self, # njp
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 196, in init
self.extracted_tree = self.extract_html(self.tree)
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 818, in extract_html
item_xhtml = self._extract_html(item)
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 818, in _extract_html
item_xhtml = self._extract_html(item)
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 806, in _extract_html
self._extract_html, response_msg=overall_msg
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/responsetypes.py", line 243, in render_html
item_xhtml = renderer(item)
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 800, in _extract_html
return self.inputs[input_id].get_html()
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/inputtypes.py", line 345, in get_html
html = self.capa_system.render_template(self.template, context)
File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 133, in render_to_string
template = lookup_template(namespace, template_name)
File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/paths.py", line 80, in lookup_template
return LOOKUP[namespace].get_template(name)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/lookup.py", line 245, in get_template
return self._load(srcfile, uri)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/lookup.py", line 311, in _load
**self.template_args)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 321, in __init

module = self.compile_from_file(path, filename)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 379, in compile_from_file
module = compat.load_module(self.module_id, path)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/compat.py", line 58, in load_module
fp = open(path, 'rb')
Exception: cannot create LoncapaProblem block-v1:edX+DemoX+Demo_Course+type@problem+block@Sample_ChemFormula_Problem: [Errno 13] Permission denied: '/tmp/mako_lms/35b4de82addd2666f931e3dcd3a9da25/chemicalequationinput.html.py'
Oct 19 15:46:48 vps199556 [service_variant=lms][xmodule.x_module][env:sandbox] ERROR [vps199556 4906] [x_module.py:1141] - Error creating xmodule
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1129, in _xmodule
for_parent=self.get_parent() if self.has_cached_parent else None
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 635, in construct_xblock_from_class
args, *kwargs
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/capa_module.py", line 48, in __init

super(CapaModule, self).init(args, *kwargs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/capa_base.py", line 230, in init
self.lcp = self.new_lcp(self.get_state_for_lcp())
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/capa_base.py", line 322, in new_lcp
capa_module=self, # njp
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 196, in init
self.extracted_tree = self.extract_html(self.tree)
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 818, in extract_html
item_xhtml = self._extract_html(item)
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 806, in _extract_html
self._extract_html, response_msg=overall_msg
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/responsetypes.py", line 243, in render_html
item_xhtml = renderer(item)
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/capa_problem.py", line 800, in _extract_html
return self.inputs[input_id].get_html()
File "/edx/app/edxapp/edx-platform/common/lib/capa/capa/inputtypes.py", line 345, in get_html
html = self.capa_system.render_template(self.template, context)
File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 133, in render_to_string
template = lookup_template(namespace, template_name)
File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/paths.py", line 80, in lookup_template
return LOOKUP[namespace].get_template(name)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/lookup.py", line 245, in get_template
return self._load(srcfile, uri)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/lookup.py", line 311, in _load
**self.template_args)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 321, in __init

module = self._compile_from_file(path, filename)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 379, in _compile_from_file
module = compat.load_module(self.module_id, path)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/compat.py", line 58, in load_module
fp = open(path, 'rb')
Exception: cannot create LoncapaProblem block-v1:edX+DemoX+Demo_Course+type@problem+block@c554538a57664fac80783b99d9d6da7c: [Errno 13] Permission denied: '/tmp/mako_lms/35b4de82addd2666f931e3dcd3a9da25/imageinput.html.py'
Oct 19 15:46:48 vps199556 [service_variant=lms][edx.courseware][env:sandbox] INFO [vps199556 4906] [grades.py:143] - Signal fired when student grade is calculated. Receiver: . Response: None
Oct 19 15:46:48 vps199556 [service_variant=lms][certificates.queue][env:sandbox] INFO [vps199556 4906] [queue.py:301] - Student 1 is whitelisted in 'course-v1:edX+DemoX+Demo_Course'
Oct 19 15:46:48 vps199556 [service_variant=lms][requests.packages.urllib3.connectionpool][env:sandbox] INFO [vps199556 4906] [connectionpool.py:180] - Starting new HTTP connection (1): localhost
Oct 19 15:46:49 vps199556 [service_variant=lms][certificates.queue][env:sandbox] INFO [vps199556 4906] [queue.py:367] - The certificate status has been set to 'generating'. Sent a certificate grading task to the XQueue with the key 'd9c29c2bf3aca9b785c373c4ed292c2b'.
Oct 19 15:46:49 vps199556 [service_variant=lms][certificates.management.commands.regenerate_user][env:sandbox] INFO [vps199556 4906] [regenerate_user.py:131] - Added a certificate regeneration task to the XQueue for student 1 in course 'course-v1:edX+DemoX+Demo_Course'. The new certificate status is '('generating', )'.
Oct 19 15:46:49 vps199556 [service_variant=lms][certificates.management.commands.regenerate_user][env:sandbox] INFO [vps199556 4906] [regenerate_user.py:151] - Finished regenerating certificates command for user 1 and course 'course-v1:edX+DemoX+Demo_Course'.

And when use the generate certificate report command I have the following lines wich show that the lcertificate has been generated and is downloadable.

./manage.py lms --settings aws gen_cert_report -c course-v1:edX+DemoX+Demo_Course
2015-10-19 09:56:18,282 INFO 7624 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
Looking up certificate states for course-v1:edX+DemoX+Demo_Course
course ID audit_enrolled downloadable enrolled_current enrolled_total honor honor_enrolled verified_enrolled
course-v1:edX+DemoX+Demo_Course 0 1 4 4 1 1 0

certificate_download

Is there anyone that has alreday faced the same error?

David Baumgold

unread,
Oct 19, 2015, 10:41:54 AM10/19/15
to opene...@googlegroups.com, Saikou Balde
Looks like a permissions issue: [Errno 13] Permission denied: '/tmp/mako_lms/35b4de82addd2666f931e3dcd3a9da25/chemicalequationinput.html.py’ Does your user account on the fullstack instance have permission to access that file?

Also, edX does not support running Open edX on Ubuntu 14.04. We recommend using Ubuntu 12.04.

David Baumgold
Developer Advocate, edX
--
You received this message because you are subscribed to the Google Groups "Open edX operations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/3dd0126c-4fe5-4b0c-a331-f1f7b78dd706%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sven Marnach

unread,
Oct 19, 2015, 11:54:10 AM10/19/15
to openedx-ops, Saikou Balde
The regenerate_user management command must be run as user www-data on the full stack.  See

    https://github.com/edx/configuration/wiki/edX-Managing-the-Full-Stack#generate-certificates-after-a-course-ends

for further details.
--
Sven
@OpenCraft

Saikou Yaya BALDE

unread,
Oct 19, 2015, 2:26:03 PM10/19/15
to Sven Marnach, openedx-ops
Hello Sven,

I ran it as "www-data” and able to generate the certificate.

I can see the certificate when i copy paste the download link from the database table “certificate_generatedcertificate” to my browser.

Unfortunately, I still don’t have the “download” button on my dashboard.

I recompiled the assets and restarted the edxapp but it doesn’t change anything.

Regards,
Saikou

Saikou Yaya BALDE

unread,
Oct 19, 2015, 2:55:21 PM10/19/15
to Sven Marnach, openedx-ops

199556:/edx/app/edxapp/edx-platform# sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws regenerate_user -u ho...@example.com -c course-v1:edX+DemoX+Demo_Course --insecure

2015-10-19 13:40:33,191 INFO 32559 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125

2015-10-19 13:40:34,196 INFO 32559 [certificates.management.commands.regenerate_user] regenerate_user.py:67 - Starting to create tasks to regenerate certificates with arguments () and options {'username': '<USERNAME>', 'template_file': None, 'settings': None, 'grade_value': None, 'pythonpath': None, 'verbosity': '1', 'traceback': None, 'course': 'course-v1:edX+DemoX+Demo_Course', 'noop': False, 'insecure': True}

2015-10-19 13:40:34,557 INFO 32559 [certificates.management.commands.regenerate_user] regenerate_user.py:105 - Adding task to the XQueue to generate a certificate for student 1 in course 'course-v1:edX+DemoX+Demo_Course'.

2015-10-19 13:40:35,093 INFO 32559 [edx.courseware] grades.py:143 - Signal fired when student grade is calculated. Receiver: <function listen_for_grade_calculation at 0x7f6f1a4ed5f0>. Response: None

2015-10-19 13:40:35,105 INFO 32559 [certificates.queue] queue.py:301 - Student 1 is whitelisted in 'course-v1:edX+DemoX+Demo_Course'

2015-10-19 13:40:35,113 INFO 32559 [requests.packages.urllib3.connectionpool] connectionpool.py:180 - Starting new HTTP connection (1): localhost

2015-10-19 13:40:35,372 INFO 32559 [certificates.queue] queue.py:367 - The certificate status has been set to 'generating'.  Sent a certificate grading task to the XQueue with the key 'b68ba36d54d8d7ebbf61fbcbb91ec0ca'. 

2015-10-19 13:40:35,379 INFO 32559 [certificates.management.commands.regenerate_user] regenerate_user.py:131 - Added a certificate regeneration task to the XQueue for student 1 in course 'course-v1:edX+DemoX+Demo_Course'. The new certificate status is '('generating', <GeneratedCertificate: GeneratedCertificate object>)'.

2015-10-19 13:40:35,379 INFO 32559 [certificates.management.commands.regenerate_user] regenerate_user.py:151 - Finished regenerating certificates command for user 1 and course 'course-v1:edX+DemoX+Demo_Course'.



On 19 Oct 2015, at 17:53, Sven Marnach <sv...@opencraft.com> wrote:

Sivakumar

unread,
Mar 21, 2016, 11:30:27 AM3/21/16
to Open edX operations, sv...@opencraft.com
We are facing the same issue.

Is it resolved? If so, Can you help us on this?

Looking forward.

Thanks.

Sivakumar

unread,
Mar 21, 2016, 12:00:57 PM3/21/16
to Open edX operations, sv...@opencraft.com
Initially, I ran the following command to generate the certificate,

sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws ungenerated_certs -c course-v1:XXXX+SA101+2016_T1


At that time, I was able to download the certificate from the dashboard.

After some time, I ran the same command, after that I was not able to see download option in Dashboard and status remains "Your Certificate is Generating"

In certs-stdout.log file, I see following one,

2016-03-21 15:47:39,303 CRITICAL 30980 [certificates.gen_cert] gen_cert.py:263 - I/O error (2): No such file or directory opening /edx/app/certs/certificates/template_data/v1-cert-templates/certificate-template-XXXX-SA101.pdf
2016-03-21 15:47:39,304 CRITICAL 30980 [certificates: __main__] certificate_agent.py:112 - Unable to parse queue submission ([Errno 2] No such file or directory: '/edx/app/certs/certificates/template_data/v1-cert-templates/certificate-template-XXXX-SA101.pdf') : {u'xqueue_files': u'{}', u'xqueue_header': u'{"submission_id": 2, "submission_key": "7bb42573ac644b13423478906c44ca8f"}', u'xqueue_body': u'{"username": "XXXX", "template_pdf": "certificate-template-XXXX-SA101.pdf", "course_name": "Sample", "name": "XXX", "grade": "Pass", "course_id": "course-v1:XXXX+SA101+2016_T1", "action": "create"}'}

Initially, above issue did not pop up. After the running certificate generation command again, issue appeared. I don't know how to resolve this.

Can someone help me to resolve this.?

Looking forward.

Thanks.

Sivakumar

unread,
Mar 23, 2016, 3:59:51 AM3/23/16
to Open edX operations, sv...@opencraft.com
Hi,

Does anyone have an answer to this?

Looking Forward.

Thanks.

Stuart O'Day

unread,
Mar 24, 2016, 6:23:53 PM3/24/16
to Open edX operations, sv...@opencraft.com
Does the pdf file exist in the /edx/app/certs/certificates/template_data/v1-cert-templates/ directory?  Is it owned by 'certs' and world readable (-rw-r--r-- permissions when performing ls -l)?

Is your lms running on http or https?  If http need to add the option --insecure to the command line.

Sivakumar

unread,
Mar 28, 2016, 1:46:44 AM3/28/16
to Open edX operations, sv...@opencraft.com
There is no pdf file for the course which i have created in /edx/app/certs/certificates/template_data/v1-cert-templates/ directory. I can see the pdf file for DemoX course.

What am I missing here? What should I do to generate the pdf file?

Thanks.

Sivakumar

unread,
Mar 29, 2016, 9:24:24 AM3/29/16
to Open edX operations, sv...@opencraft.com
Hi,

Any Update on this?

Thanks.

ees...@u.uchile.cl

unread,
Mar 29, 2016, 12:00:33 PM3/29/16
to Open edX operations, sv...@opencraft.com
Hi,

You need to have a pdf to your course (try to copy the demoX course for test)

Sivakumar

unread,
Mar 30, 2016, 2:09:05 AM3/30/16
to Open edX operations, sv...@opencraft.com
Thanks for your prompt response.

If I copy the file, it is working perfectly.

Should I do this every time before issuing certificates (or) is there any way to automate it?

Regards,
Sivakumar.

ees...@u.uchile.cl

unread,
Mar 31, 2016, 1:25:07 PM3/31/16
to Open edX operations, sv...@opencraft.com
Yes, you have to do every time.  I do not if there is a automatic way.

Sivakumar

unread,
Apr 1, 2016, 2:37:43 AM4/1/16
to Open edX operations, sv...@opencraft.com
This is not a feasible solution.

There should be an automated way to do this.

Does someone have an idea where I am going wrong?

Looking forward.

Thanks. 

Alejandro León González

unread,
May 11, 2020, 6:40:51 AM5/11/20
to Open edX operations
Hello guys,

I have the same problem in Hawthorn, was any solution found to this?

Thanks.
BR.
Reply all
Reply to author
Forward
0 new messages