Fix json dump for Python3

This commit is contained in:
Matthew Honnibal 2017-04-23 17:05:53 +02:00
parent 040751ad17
commit 4d2a659c52

View File

@ -195,7 +195,7 @@ class Language(object):
if directory.exists():
shutil.rmtree(str(directory))
directory.mkdir()
with (directory / 'config.json').open('wb') as file_:
with (directory / 'config.json').open('w') as file_:
data = json_dumps(config)
file_.write(data)
if not (path / 'vocab').exists():