698 B
698 B
变更:修复缺失的 os 模块导入
原因
在移除环境变量配置支持时,错误地删除了 app/services/dashscope_service.py 中的 import os 语句。但代码中仍在使用 os.name 来检测操作系统类型(用于 Windows 路径处理),导致运行时错误:name 'os' is not defined。
变更内容
- 在
app/services/dashscope_service.py中重新添加import os语句 os.name用于检测操作系统类型('nt' 表示 Windows),这是必要的功能,与环境变量无关
影响
- 受影响的代码:
app/services/dashscope_service.py- 添加import os
- 修复的错误:
name 'os' is not defined运行时错误