From aff19cb8bd59c5376cd638cef4ee39f05786a3a8 Mon Sep 17 00:00:00 2001 From: Rahul Mehta <98349643+rahul-theorem@users.noreply.github.com> Date: Wed, 31 Aug 2022 12:37:45 -0400 Subject: [PATCH] Properly raise error in NumpyArrayTransformer (#1146) Signed-off-by: Rahul Mehta Signed-off-by: Rahul Mehta --- flytekit/types/numpy/ndarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytekit/types/numpy/ndarray.py b/flytekit/types/numpy/ndarray.py index cb1cf2a900..b4f67b94f1 100644 --- a/flytekit/types/numpy/ndarray.py +++ b/flytekit/types/numpy/ndarray.py @@ -52,7 +52,7 @@ def to_python_value(self, ctx: FlyteContext, lv: Literal, expected_python_type: try: uri = lv.scalar.blob.uri except AttributeError: - TypeTransformerFailedError(f"Cannot convert from {lv} to {expected_python_type}") + raise TypeTransformerFailedError(f"Cannot convert from {lv} to {expected_python_type}") local_path = ctx.file_access.get_random_local_path() ctx.file_access.get_data(uri, local_path, is_multipart=False)