From 0859a42f3099062ab1b520d1643514942a22e545 Mon Sep 17 00:00:00 2001 From: timonmerk Date: Tue, 8 Oct 2024 09:43:42 +0200 Subject: [PATCH] make database accessible from multiple threads --- py_neuromodulation/utils/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py_neuromodulation/utils/database.py b/py_neuromodulation/utils/database.py index 549470a6..cfc49284 100644 --- a/py_neuromodulation/utils/database.py +++ b/py_neuromodulation/utils/database.py @@ -41,7 +41,7 @@ def __init__( self.csv_path.parent.mkdir(parents=True, exist_ok=True) - self.conn = sqlite3.connect(self.db_path) + self.conn = sqlite3.connect(self.db_path, check_same_thread=False) self.cursor = self.conn.cursor() # Database config and optimization, prioritize data integrity