fix(scripts): 修复编码问题并添加错误追踪
在compile_machine_code.py中添加utf-8编码设置以避免潜在编码问题 添加traceback.print_exc()以在编译失败时打印完整错误堆栈 更新.gitignore以忽略config.toml文件
This commit is contained in:
@@ -166,7 +166,8 @@ def compile_module(module_path):
|
||||
[sys.executable, '-m', 'mypyc', module_path],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True
|
||||
check=True,
|
||||
encoding='utf-8' # 设置正确的编码
|
||||
)
|
||||
|
||||
# 获取平台特定的模块名
|
||||
@@ -206,6 +207,8 @@ def compile_module(module_path):
|
||||
return False
|
||||
except Exception as e:
|
||||
print(f" ✗ 编译失败,意外错误: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return False
|
||||
|
||||
def should_skip_module(module_path):
|
||||
|
||||
Reference in New Issue
Block a user