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: