Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
fix(setup): fix encoding problem in
  • Loading branch information
hanhxiao committed Aug 16, 2019
1 parent 42da24d commit 2f90516822a56c63833805c8b88f732007714b04
Showing with 2 additions and 2 deletions.
  1. +2 −2 gnes/base/
@@ -231,15 +231,15 @@ def dump_yaml(self, filename: str = None) -> None:
f = filename or self.yaml_full_path
if not f:
f = tempfile.NamedTemporaryFile('w', delete=False, dir=os.environ.get('GNES_VOLUME', None)).name
with open(f, 'w') as fp:
with open(f, 'w', encoding='utf8') as fp:
yaml.dump(self, fp)'model\'s yaml config is dump to %s' % f)

def load_yaml(cls: Type[T], filename: Union[str, TextIO]) -> T:
if not filename: raise FileNotFoundError
if isinstance(filename, str):
with open(filename) as fp:
with open(filename, encoding='utf8') as fp:
return yaml.load(fp)
with filename:

0 comments on commit 2f90516

Please sign in to comment.