diff --git a/flytekit/core/type_engine.py b/flytekit/core/type_engine.py index 9c48908f98..7b4f17eda5 100644 --- a/flytekit/core/type_engine.py +++ b/flytekit/core/type_engine.py @@ -1141,7 +1141,12 @@ def to_python_value(self, ctx: FlyteContext, lv: Literal, expected_python_type: try: lits = lv.collection.literals except AttributeError: - raise TypeTransformerFailedError() + raise TypeTransformerFailedError( + ( + f"The expected python type is '{expected_python_type}' but the received Flyte literal value " + f"is not a collection (Flyte's representation of Python lists)." + ) + ) if self.is_batchable(expected_python_type): from flytekit.types.pickle import FlytePickle