1、修复了只读权限下保存csv时,无法正确保存的问题,当无法正确保存时,程序将输出较为直观的提示信息

2、对多处保存路径进行了空值检测,为空值时程序将输出较为直观的提示信息
This commit is contained in:
2025-06-04 00:29:18 +08:00
parent ba2de0df39
commit 65f8bef694
14 changed files with 193 additions and 33 deletions

View File

@ -492,6 +492,10 @@ class Data:
try:
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False, float_format='%.4f')
except PermissionError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
except FileNotFoundError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
except Exception as e:
return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())