From 5322eafac7145629e7f0ce6ea86007c8fb63bf18 Mon Sep 17 00:00:00 2001 From: Scott Warchal Date: Thu, 5 Sep 2024 10:50:24 +0100 Subject: [PATCH] specify db driver in connection string (fixes #NEUT-17) --- plaque_assay/main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plaque_assay/main.py b/plaque_assay/main.py index 5f731b5..5a635eb 100644 --- a/plaque_assay/main.py +++ b/plaque_assay/main.py @@ -3,17 +3,15 @@ the titration analysis. """ - import os from typing import List import sqlalchemy -from plaque_assay.experiment import Experiment -from plaque_assay.errors import DatabaseCredentialError +from plaque_assay import ingest, utils from plaque_assay.db_uploader import AnalysisDatabaseUploader -from plaque_assay import ingest -from plaque_assay import utils +from plaque_assay.errors import DatabaseCredentialError +from plaque_assay.experiment import Experiment def create_engine(test: bool = True) -> sqlalchemy.engine.base.Engine: @@ -49,7 +47,9 @@ def create_engine(test: bool = True) -> sqlalchemy.engine.base.Engine: "db credentials not found in environent.", "Need to set NE_USER, NE_HOST_{TEST,PROD}, NE_PASSWORD", ) - engine = sqlalchemy.create_engine(f"mysql://{user}:{password}@{host}/serology") + engine = sqlalchemy.create_engine( + f"mysql+mysqldb://{user}:{password}@{host}/serology" + ) return engine