From b445dfe62ff915692facb44335e849a8e806fff5 Mon Sep 17 00:00:00 2001 From: Abelardo Pardo Date: Wed, 16 Aug 2023 16:58:43 +0930 Subject: [PATCH] Fix error appearing when db password has special characters #244 Signed-off-by: Abelardo Pardo --- ontask/dataops/pandas/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ontask/dataops/pandas/database.py b/ontask/dataops/pandas/database.py index e3ea6f074..952d0fe64 100644 --- a/ontask/dataops/pandas/database.py +++ b/ontask/dataops/pandas/database.py @@ -1,5 +1,6 @@ """Functions to manipulate Pandas DataFrames and related operations.""" from typing import Dict, List, Mapping, Optional +from urllib import parse import pandas as pd import sqlalchemy @@ -55,7 +56,7 @@ def create_db_engine(**kwargs): dial=kwargs.get('dialect'), drv=kwargs.get('driver'), usr=kwargs.get('username'), - pwd=kwargs.get('password'), + pwd=parse.quote(kwargs.get('password')), h=kwargs.get('host'), dbname=kwargs.get('dbname'))