Skip to content

Commit 13da7b3

Browse files
authored
fix #73: 伴奏人声分离时报错:FileNotFoundError (#74)
* fix #73: 伴奏人声分离时报错:FileNotFoundError * Apply Code Formatter Change --------- Co-authored-by: fumiama <[email protected]>
1 parent 6fb458a commit 13da7b3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

i18n/locale_diff.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
# Find all JSON files in the directory
99
dir_path = "./"
10-
languages = [f for f in os.listdir(dir_path) if f.endswith(".json") and f != standard_file]
10+
languages = [
11+
f for f in os.listdir(dir_path) if f.endswith(".json") and f != standard_file
12+
]
1113

1214
# Load the standard file
1315
with open(standard_file, "r", encoding="utf-8") as f:
@@ -35,8 +37,8 @@
3537
# Sort the keys of the language file to match the order of the standard file
3638
lang_data = OrderedDict(
3739
sorted(lang_data.items(), key=lambda x: list(standard_data.keys()).index(x[0]))
38-
)
40+
)
3941

4042
# Save the updated language file
4143
with open(lang_file, "w", encoding="utf-8") as f:
42-
json.dump(lang_data, f, ensure_ascii=False, indent=4)
44+
json.dump(lang_data, f, ensure_ascii=False, indent=4)

uvr5_pack/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55

66

7-
def load_data(file_name: str = "./uvr5_pack/data.json") -> dict:
7+
def load_data(file_name: str = "./uvr5_pack/name_params.json") -> dict:
88
with open(file_name, "r") as f:
99
data = json.load(f)
1010

0 commit comments

Comments
 (0)