Skip to content

Commit

Permalink
Merge pull request #469 from zxy199803/v2-main
Browse files Browse the repository at this point in the history
ERROR when saving modle in windos10
  • Loading branch information
BrikerMan committed Jul 4, 2021
2 parents 4f14c22 + 5eb38de commit 69ae09f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kashgari/tasks/abs_task_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def save(self, model_path: str) -> str:
pathlib.Path(model_path).mkdir(exist_ok=True, parents=True)
model_path = os.path.abspath(model_path)

with open(os.path.join(model_path, 'model_config.json'), 'w') as f:
with open(os.path.join(model_path, 'model_config.json'), 'w', encoding='utf8') as f:
f.write(json.dumps(self.to_dict(), indent=2, ensure_ascii=False))
f.close()

Expand Down

0 comments on commit 69ae09f

Please sign in to comment.