Skip to content

Commit

Permalink
Bugfix/error db multiple thread (#249)
Browse files Browse the repository at this point in the history
* fix error of db multiple thread; fix mock data ensure_ascii error

* update version code
  • Loading branch information
yumiguan authored Nov 5, 2019
1 parent a44e6bb commit 1cc2d47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lyrebird/db/database_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, path=None):
else:
database_uri = path_obj.absolute()

sqlite_path = 'sqlite:///'+str(database_uri)
sqlite_path = 'sqlite:///'+str(database_uri)+'?check_same_thread=False'

engine = create_engine(str(sqlite_path))
# Create all tables
Expand Down
2 changes: 1 addition & 1 deletion lyrebird/mock/dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def int_parser(self, val):
return f'{val}'

def str_parser(self, val):
return json.dumps(val)
return json.dumps(val, ensure_ascii=False)

def none_parser(self, val):
return "null"
Expand Down
2 changes: 1 addition & 1 deletion lyrebird/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
IVERSION = (1, 7, 6)
IVERSION = (1, 7, 7)
VERSION = ".".join(str(i) for i in IVERSION)
LYREBIRD = "Lyrebird " + VERSION

0 comments on commit 1cc2d47

Please sign in to comment.