##// END OF EJS Templates
Pass nbformat object to write call to save .py script...
Thomas Kluyver -
Show More
@@ -251,7 +251,7 b' class FileNotebookManager(NotebookManager):'
251 self.log.debug("Writing script %s", py_path)
251 self.log.debug("Writing script %s", py_path)
252 try:
252 try:
253 with io.open(py_path, 'w', encoding='utf-8') as f:
253 with io.open(py_path, 'w', encoding='utf-8') as f:
254 current.write(model, f, u'py')
254 current.write(nb, f, u'py')
255 except Exception as e:
255 except Exception as e:
256 raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s %s' % (py_path, e))
256 raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s %s' % (py_path, e))
257
257
General Comments 0
You need to be logged in to leave comments. Login now