##// END OF EJS Templates
Decode data for saving notebook, allowing saving in Python 3.
Thomas Kluyver -
Show More
@@ -150,7 +150,7 class NotebookManager(LoggingConfigurable):
150 150 raise web.HTTPError(415, u'Invalid notebook format: %s' % format)
151 151
152 152 try:
153 nb = current.reads(data, format)
153 nb = current.reads(data.decode('utf-8'), format)
154 154 except:
155 155 raise web.HTTPError(400, u'Invalid JSON data')
156 156
@@ -171,7 +171,7 class NotebookManager(LoggingConfigurable):
171 171 raise web.HTTPError(415, u'Invalid notebook format: %s' % format)
172 172
173 173 try:
174 nb = current.reads(data, format)
174 nb = current.reads(data.decode('utf-8'), format)
175 175 except:
176 176 raise web.HTTPError(400, u'Invalid JSON data')
177 177
General Comments 0
You need to be logged in to leave comments. Login now