欠费处理

This commit is contained in:
2025-12-14 00:11:38 +08:00
parent f9e2eb6d76
commit 16e3507f7f
2 changed files with 7 additions and 1 deletions

View File

@@ -29,7 +29,11 @@ def main():
image_path = Path(root_folder) / image image_path = Path(root_folder) / image
if check_emoji(emoji_uuid): if check_emoji(emoji_uuid):
try:
description = gen.process_single_image(str(image_path)) description = gen.process_single_image(str(image_path))
except AttributeError:
logger.warning("AI模型未响应请检查是否欠费")
break
update_description(emoji_uuid, description) update_description(emoji_uuid, description)
if description: if description:
logger.info(f"图片 {emoji_file} 的描述词生成完毕,序号:{i + 1} 其 description 为: {description}") logger.info(f"图片 {emoji_file} 的描述词生成完毕,序号:{i + 1} 其 description 为: {description}")

View File

@@ -37,6 +37,8 @@ class Generator:
return None return None
except AttributeError as e:
raise AttributeError(e)
except Exception as e: except Exception as e:
logger.error(f"API调用失败: {e}") logger.error(f"API调用失败: {e}")
return None return None