From 02d003b22c6f3b53988eb4eaa9b4b478e509ace6 Mon Sep 17 00:00:00 2001
From: Tamas Gal <himself@tamasgal.com>
Date: Mon, 17 Jun 2024 09:58:02 +0200
Subject: [PATCH] Fix an issue of time_residuals when CSV is moved

---
 backend/scripts/time_residuals.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/backend/scripts/time_residuals.py b/backend/scripts/time_residuals.py
index 3ee6ba8..7c0bb25 100755
--- a/backend/scripts/time_residuals.py
+++ b/backend/scripts/time_residuals.py
@@ -37,6 +37,10 @@ def main():
 
     while True:
         print("Reading data...")
+        df = pd.read_csv(
+            args['TIME_RESIDUALS_FILE'],
+            names=["run", "timestamp", "du", "floor", "dom_id", "t_res", "Q"]
+        )
         df = pd.read_csv(args['TIME_RESIDUALS_FILE'])
         df = df[df.timestamp > time.time() - 60 * 60 * hours]
         print(f" -> number of entries: {len(df)}")
-- 
GitLab