diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e3153d9..44982f2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -29,3 +29,4 @@ Please keep the lists sorted alphabetically. * Matthijs van der Boon * Mayank Mittal * Zhang Chong +* Ziqi Fan diff --git a/rsl_rl/utils/utils.py b/rsl_rl/utils/utils.py index f8d3103..00a13be 100644 --- a/rsl_rl/utils/utils.py +++ b/rsl_rl/utils/utils.py @@ -78,7 +78,7 @@ def store_code_state(logdir, repositories) -> list: continue # write the diff file print(f"Storing git diff for '{repo_name}' in: {diff_file_name}") - with open(diff_file_name, "x") as f: + with open(diff_file_name, "x", encoding="utf-8") as f: content = f"--- git status ---\n{repo.git.status()} \n\n\n--- git diff ---\n{repo.git.diff(t)}" f.write(content) # add the file path to the list of files to be uploaded