Skip to content

Commit

Permalink
Fix json dump
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Nov 5, 2016
1 parent 435e9bd commit 826e59f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions krysa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import math
import string
import sqlite3
from io import open
import os.path as op
from functools import partial
from time import gmtime, strftime
Expand Down Expand Up @@ -965,8 +964,8 @@ def _save_project(self, selection=None, fname=None, *args):
# (dummy for now)
# dump widgets' properties from process flow to dict, then to json
project = {u'test': u'blah'}
with open(op.join(selection, fname), 'w', encoding='utf8') as f:
f.write(json.dumps(project, indent=4).decode('utf8'))
with open(op.join(selection, fname), 'wb') as f:
f.write(bytes(json.dumps(project, indent=4)))

# let user set table columns, add to tab, then:
self._export_data([data], 'data.sqlite')
Expand Down

0 comments on commit 826e59f

Please sign in to comment.