From 03e948acbcc15deba76760cda1a0db06862cbf7e Mon Sep 17 00:00:00 2001 From: adkinsrs Date: Mon, 28 Oct 2024 09:10:39 -0400 Subject: [PATCH] Resolving close adata object bug --- www/api/resources/projectr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/api/resources/projectr.py b/www/api/resources/projectr.py index 5d3c2b9a..53ae2945 100644 --- a/www/api/resources/projectr.py +++ b/www/api/resources/projectr.py @@ -497,7 +497,10 @@ def projectr_callback(dataset_id, genecart_id, projection_id, session_id, scope, , "num_dataset_genes": num_target_genes } - adata.close() + # Close adata so that we do not have a stale opened object + if adata.isbacked: + adata.file.close() + if dedup_copy.exists(): dedup_copy.unlink()