From 53aa084fd2c9c930ac791ee43affffb3f788547c Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 3 Oct 2022 09:04:03 +0300 Subject: Bug: Don't process data for output early * The ",".join(...) call was processing the data for output to file, way too early, which would lead to errors down the line, very far removed from the actual cause of the error. --- wqflask/wqflask/correlation/pre_computes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wqflask/wqflask/correlation/pre_computes.py b/wqflask/wqflask/correlation/pre_computes.py index 330925f9..85720013 100644 --- a/wqflask/wqflask/correlation/pre_computes.py +++ b/wqflask/wqflask/correlation/pre_computes.py @@ -204,7 +204,7 @@ def read_text_file(sample_dict, file_path): csv_reader = csv.reader(csv_file, delimiter=',') _posit, sample_vals = __fetch_id_positions__( next(csv_reader)[1:], sample_dict) - return (sample_vals, [",".join([line[i] for i in _posit]) for line in csv_reader]) + return (sample_vals, [[line[i] for i in _posit] for line in csv_reader]) def write_db_to_textfile(db_name, conn, text_dir=TMPDIR): -- cgit v1.2.3