Skip to content
Snippets Groups Projects
Commit 27ccb4d6 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[database] Encode before writing to file

parent 2d35fba9
Branches
Tags
2 merge requests!17Merge development branch 1.5.x,!10Py3 compatibility
...@@ -135,7 +135,8 @@ class Runner(object): ...@@ -135,7 +135,8 @@ class Runner(object):
os.makedirs(os.path.dirname(filename)) os.makedirs(os.path.dirname(filename))
with open(filename, 'wb') as f: 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): def setup(self, filename, start_index=None, end_index=None, pack=True):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment