Commit 27ccb4d6 authored by Samuel GAIST's avatar Samuel GAIST

[database] Encode before writing to file

parent 2d35fba9
......@@ -135,7 +135,8 @@ class Runner(object):
os.makedirs(os.path.dirname(filename))
with open(filename, 'wb') as f:
simplejson.dump(objs, f, cls=utils.NumpyJSONEncoder)
data = simplejson.dumps(objs, cls=utils.NumpyJSONEncoder)
f.write(data.encode('utf-8'))
def setup(self, filename, start_index=None, end_index=None, pack=True):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment