Fix misleading HTTP 500 detail and RuntimeWarning on single-image selection
- HTTP 500 errors from Frigate no longer echo the response body to the user (Frigate's generic message says 'Try restarting Frigate' which is wrong — 500s on upload are almost always image-specific, not a health issue). The detail is now logged at debug level. HTTP 400 detail is still shown since 'No face was detected' is genuinely useful. - np.median on empty upper triangle (n=1 after quality filtering) no longer emits RuntimeWarning; _compute_adaptive_threshold returns the floor (0.05) immediately when there are no pairwise distances to sample. - k-medoids cluster count floor raised to 1 (was 0 when n < 3), preventing k=0 being passed to _kmedoids.
This commit is contained in:
+3
-1
@@ -580,10 +580,12 @@ def upload_to_frigate(jobs: list[dict]) -> None:
|
||||
)
|
||||
try:
|
||||
error_detail = resp.json().get("message", resp.text[:100])
|
||||
progress.console.print(f" [dim]{error_detail}[/dim]")
|
||||
except Exception:
|
||||
error_detail = resp.text[:100]
|
||||
if resp.status_code == 400:
|
||||
progress.console.print(f" [dim]{error_detail}[/dim]")
|
||||
else:
|
||||
logger.debug(f"{fname} HTTP {resp.status_code}: {error_detail}")
|
||||
if resp.status_code == 400 and "face" in error_detail.lower():
|
||||
asset_id = asset_map.get(fname)
|
||||
if asset_id:
|
||||
|
||||
Reference in New Issue
Block a user