Show More
@@ -62,8 +62,11 b' class NbconvertFileHandler(IPythonHandler):' | |||
|
62 | 62 | |
|
63 | 63 | info = os.stat(os_path) |
|
64 | 64 | self.set_header('Last-Modified', tz.utcfromtimestamp(info.st_mtime)) |
|
65 | ||
|
66 | output, resources = exporter.from_filename(os_path) | |
|
65 | ||
|
66 | try: | |
|
67 | output, resources = exporter.from_filename(os_path) | |
|
68 | except Exception as e: | |
|
69 | raise web.HTTPError(500, "nbconvert failed: %s" % e) | |
|
67 | 70 | |
|
68 | 71 | if respond_zip(self, name, output, resources): |
|
69 | 72 | return |
@@ -90,8 +93,11 b' class NbconvertPostHandler(IPythonHandler):' | |||
|
90 | 93 | |
|
91 | 94 | model = self.get_json_body() |
|
92 | 95 | nbnode = to_notebook_json(model['content']) |
|
93 | ||
|
94 | output, resources = exporter.from_notebook_node(nbnode) | |
|
96 | ||
|
97 | try: | |
|
98 | output, resources = exporter.from_notebook_node(nbnode) | |
|
99 | except Exception as e: | |
|
100 | raise web.HTTPError(500, "nbconvert failed: %s" % e) | |
|
95 | 101 | |
|
96 | 102 | if respond_zip(self, nbnode.metadata.name, output, resources): |
|
97 | 103 | return |
General Comments 0
You need to be logged in to leave comments.
Login now