diff --git a/dataprofiler/labelers/data_processing.py b/dataprofiler/labelers/data_processing.py index 1ef95587e..b8d3b34c8 100644 --- a/dataprofiler/labelers/data_processing.py +++ b/dataprofiler/labelers/data_processing.py @@ -1555,8 +1555,7 @@ def __init__( random_state = random.Random(random_state) elif isinstance(random_state, (list, tuple)) and len(random_state) == 3: # tuple required for random state to be set, lists do not work - if isinstance(random_state[1], list): - random_state = list(random_state) + if isinstance(random_state[1], list) and isinstance(random_state, list): random_state[1] = tuple(random_state[1]) if isinstance(random_state, list): random_state = tuple(random_state) @@ -1895,8 +1894,7 @@ def __init__( random_state = random.Random(random_state) elif isinstance(random_state, (list, tuple)) and len(random_state) == 3: # tuple required for random state to be set, lists do not work - if isinstance(random_state[1], list): - random_state = list(random_state) + if isinstance(random_state[1], list) and isinstance(random_state, list): random_state[1] = tuple(random_state[1]) if isinstance(random_state, list): random_state = tuple(random_state)