##// END OF EJS Templates
Specify UTF-8 encoding for saving notebook as script.
Thomas Kluyver -
Show More
@@ -213,7 +213,7 b' class NotebookManager(LoggingConfigurable):'
213 if self.save_script:
213 if self.save_script:
214 pypath = os.path.splitext(path)[0] + '.py'
214 pypath = os.path.splitext(path)[0] + '.py'
215 try:
215 try:
216 with io.open(pypath,'w') as f:
216 with io.open(pypath,'w', encoding='utf-8') as f:
217 current.write(nb, f, u'py')
217 current.write(nb, f, u'py')
218 except Exception as e:
218 except Exception as e:
219 raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s' % e)
219 raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s' % e)
General Comments 0
You need to be logged in to leave comments. Login now