Skip to content

NVR with realtime local object detection for IP cameras

Catch case where github sends bad json data (#13077)

Nicolas Mowen2e724291db20
diff --git a/frigate/stats/util.py b/frigate/stats/util.py
index 09710b3581..ac28e3d89b 100644
--- a/frigate/stats/util.py
+++ b/frigate/stats/util.py
@@ -4,6 +4,7 @@ import asyncio
import os
import shutil
import time
+from json import JSONDecodeError
from typing import Any, Optional
import psutil
@@ -35,7 +36,7 @@ def get_latest_version(config: FrigateConfig) -> str:
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest",
timeout=10,
)
- except RequestException:
+ except (RequestException, JSONDecodeError):
return "unknown"
response = request.json()