Add prototype gameplay loop with character/battlefield assets and server game APIs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -829,15 +829,10 @@ def generate_from_image(
|
||||
except Exception:
|
||||
pass
|
||||
# 提交失败且页面有额度提示时,升级为换号登录
|
||||
if "未发起生成请求" in str(exc) or "立即生成" in str(exc):
|
||||
try:
|
||||
_raise_if_quota(page=page, payloads=generations_bodies)
|
||||
except HunyuanQuotaExceeded:
|
||||
raise
|
||||
# 无法确认额度时也当作需换号,方便用户打开登录页处理
|
||||
raise HunyuanQuotaExceeded(
|
||||
f"{exc}(已按额度/账号问题处理:将打开登录页换号)"
|
||||
) from exc
|
||||
# Only an explicit quota message should trigger account re-login.
|
||||
# A disabled generate button can also mean that the uploaded image
|
||||
# was rejected (for example, "?????"). Preserve that error so
|
||||
# the caller can fix the input image without discarding a valid session.
|
||||
raise
|
||||
finally:
|
||||
browser.close()
|
||||
|
||||
Reference in New Issue
Block a user