diff --git a/flytekit/core/python_auto_container.py b/flytekit/core/python_auto_container.py index f0163cdbf1..dfbd678fb6 100644 --- a/flytekit/core/python_auto_container.py +++ b/flytekit/core/python_auto_container.py @@ -339,7 +339,8 @@ def load_task(self, loader_args: List[str]) -> PythonAutoContainerTask: # verify the loaded_data is of the correct type if not isinstance(loaded_data, PickledEntity): raise RuntimeError( - "The loaded data is not of the correct type. Please ensure that the pickle file is not corrupted." + f"The loaded data is not of the correct type. Expected PickledEntity, found {type(loaded_data)}. " + f"Please ensure that the pickle file is not corrupted. Loaded data: {loaded_data}" ) pickled_object: PickledEntity = loaded_data