Show More
@@ -63,7 +63,10 b' class NbconvertFileHandler(IPythonHandler):' | |||
|
63 | 63 | info = os.stat(os_path) |
|
64 | 64 | self.set_header('Last-Modified', tz.utcfromtimestamp(info.st_mtime)) |
|
65 | 65 | |
|
66 | try: | |
|
66 | 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 |
@@ -91,7 +94,10 b' class NbconvertPostHandler(IPythonHandler):' | |||
|
91 | 94 | model = self.get_json_body() |
|
92 | 95 | nbnode = to_notebook_json(model['content']) |
|
93 | 96 | |
|
97 | try: | |
|
94 | 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