mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Decode data for saving notebook, allowing saving in Python 3.
This commit is contained in:
parent
0f5c0f67c9
commit
609e4134ff
@ -150,7 +150,7 @@ class NotebookManager(LoggingConfigurable):
|
||||
raise web.HTTPError(415, u'Invalid notebook format: %s' % format)
|
||||
|
||||
try:
|
||||
nb = current.reads(data, format)
|
||||
nb = current.reads(data.decode('utf-8'), format)
|
||||
except:
|
||||
raise web.HTTPError(400, u'Invalid JSON data')
|
||||
|
||||
@ -171,7 +171,7 @@ class NotebookManager(LoggingConfigurable):
|
||||
raise web.HTTPError(415, u'Invalid notebook format: %s' % format)
|
||||
|
||||
try:
|
||||
nb = current.reads(data, format)
|
||||
nb = current.reads(data.decode('utf-8'), format)
|
||||
except:
|
||||
raise web.HTTPError(400, u'Invalid JSON data')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user