From c7d461ccc13fd7f111c87188460aba689a323225 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sat, 24 Sep 2022 19:41:09 -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 7d769d206..ab8f9e527 100755 --- a/frigate/util.py +++ b/frigate/util.py @@ -852,7 +852,7 @@ def get_nvidia_gpu_stats() -> dict[str, str]: return None else: usages = p.stdout.split("\n")[1].strip() - memory_percent = f"{round(float(usages[2].replace(' MiB', '')) / float(usages[3].replace(' MiB', '')) * 100, 1)} %" + 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], "gpu_usage": usages[1],