From d0b2f9b22171b542596f5369365ce8cb2b60e947 Mon Sep 17 00:00:00 2001 From: quillotm Date: Thu, 2 Sep 2021 16:39:37 +0200 Subject: [PATCH] fix issue: adding writing option for files sub2utt and utt2sub --- volia/masseffect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volia/masseffect.py b/volia/masseffect.py index a54e394..e83790b 100644 --- a/volia/masseffect.py +++ b/volia/masseffect.py @@ -99,7 +99,7 @@ def utt2sub(file: str, subfile: str, outfile: str): data_sub = core.data.read_id_values(subfile) keys_sub = [key for key in data_sub] - with open(outfile) as of: + with open(outfile, "w") as of: for key in keys: subkeys = [subkey for subkey in keys_sub if subkey.startswith(key)] subkeys_str = " ".join(subkeys) @@ -113,7 +113,7 @@ def sub2utt(file: str, subfile: str, outfile: str): data_sub = core.data.read_id_values(subfile) keys_sub = [key for key in data_sub] - with open(outfile) as of: + with open(outfile, "w") as of: for key in keys: subkeys = [subkey for subkey in keys_sub if subkey.startswith(key)] for subkey in subkeys: -- 1.8.2.3