mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 23:48:48 +08:00
windows下使用vscode连接linux服务器,不在项目目录下直接运行代码,工作区位置错误找不到 ‘./i18n/locale/en_US.json’
This commit is contained in:
parent
ea83174fe0
commit
f883717926
@ -2,6 +2,10 @@ import json
|
||||
import locale
|
||||
import os
|
||||
|
||||
# Get the directory where the script file is located
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
# Change the current working directory to the directory where the script is located
|
||||
os.chdir(os.path.join(script_dir,'../../'))
|
||||
|
||||
def load_language_list(language):
|
||||
with open(f"./i18n/locale/{language}.json", "r", encoding="utf-8") as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user