Skip to content

Commit debee5b

Browse files
committed
Fix: 細かな修正
1 parent 176353c commit debee5b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

voicevox_engine/aivm_manager.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,21 +389,21 @@ def install_model_from_url(self, url: str) -> None:
389389
# ダウンロードした AIVMX ファイルをインストール
390390
self.install_model(BytesIO(response.content))
391391
return
392-
except httpx.HTTPStatusError as ex_status:
393-
last_exception = ex_status
392+
except httpx.HTTPStatusError as ex:
393+
last_exception = ex
394394
# 403 Forbidden や 404 Not Found の場合はリトライしない
395-
if ex_status.response.status_code in [403, 404]:
395+
if ex.response.status_code in [403, 404]:
396396
logger.error(
397-
f"Failed to download AIVMX file from {url} (HTTP Error {ex_status.response.status_code}). No retry.",
398-
exc_info=ex_status,
397+
f"Failed to download AIVMX file from {url} (HTTP Error {ex.response.status_code}). No retry.",
398+
exc_info=ex,
399399
)
400400
raise HTTPException(
401401
status_code=500, # 4xx 系エラーでもサーバー側の問題として 500 を返す
402-
detail=f"AIVMX ファイルのダウンロードに失敗しました。({ex_status})",
403-
) from ex_status
402+
detail=f"AIVMX ファイルのダウンロードに失敗しました。({ex})",
403+
) from ex
404404
logger.warning(
405405
f"Failed to download AIVMX file from {url} (Attempt {retry_count + 1}/{max_retries}). Retrying...",
406-
exc_info=ex_status,
406+
exc_info=ex,
407407
)
408408
except httpx.HTTPError as ex:
409409
last_exception = ex

0 commit comments

Comments
 (0)