From f1a8a7981db2e7f69b9b4d34590342d7e99195c6 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sat, 24 Sep 2022 19:44:32 -0600 Subject: [PATCH] Strip for float conversion --- frigate/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/util.py b/frigate/util.py index ab8f9e527..8f55597c6 100755 --- a/frigate/util.py +++ b/frigate/util.py @@ -851,7 +851,7 @@ def get_nvidia_gpu_stats() -> dict[str, str]: logger.error(p.stderr) return None else: - usages = p.stdout.split("\n")[1].strip() + usages = p.stdout.split("\n")[1].strip().split(",") memory_percent = f"{round(float(usages[2].replace(' MiB', '').strip()) / float(usages[3].replace(' MiB', '').strip()) * 100, 1)} %" results: dict[str, str] = { "name": usages[0],