mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Pass nbformat object to write call to save .py script
Closes gh-4495
This commit is contained in:
parent
4ee44b3871
commit
8ed3a725f3
@ -251,7 +251,7 @@ class FileNotebookManager(NotebookManager):
|
||||
self.log.debug("Writing script %s", py_path)
|
||||
try:
|
||||
with io.open(py_path, 'w', encoding='utf-8') as f:
|
||||
current.write(model, f, u'py')
|
||||
current.write(nb, f, u'py')
|
||||
except Exception as e:
|
||||
raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s %s' % (py_path, e))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user