FIX: encode problem in python check

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I1081c9f1b31b39ed6772a2b4434a0fcd6472b621
This commit is contained in:
xun.zhang 2024-10-25 18:10:09 +08:00 committed by Lane.Wei
parent af38da4c87
commit b18b50bd64
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ def traverse_files(path):
traverse_files(file_path) # 递归遍历子文件夹
elif file_path.endswith('.json'):
# 解析 JSON 文件并提取 setting_id 的值
with open(file_path) as f:
with open(file_path,encoding='UTF-8') as f:
try:
data = json.load(f)
if 'setting_id' in data: