Jay Ganbat
01/08/2024, 7:45 PMTypeError: No constructor defined
. I can see the underlying ValidationError exception but also see During handling of the above exception, another exception occurred:
This TypeError
happens at flytekit/exceptions/scopes.py:user_entry_point
at this line
except Exception as exc:
breakpoint()
> raise type(exc)(f"Error encountered while executing '{fn_name}':\n {exc}") from exc
E TypeError: No constructor defined
it looks like pydantic v2 we need to raise specific error like this. Does anyone have this issueJay Ganbat
01/08/2024, 7:48 PMraise exc
and that seem to work as well 😅Robert Deaton
01/09/2024, 12:13 AMtype(exec)(...)
pattern that is used here and elsewhere in flytekit is fragile and makes a lot of assumptions about a user's exception types that might not be true (in this case, the exception in question doesn't have a __init__
and can't even be called like this. Should either just reraise the same exact exception, or an exception type that is under Flyte's control.Jay Ganbat
01/09/2024, 12:15 AMKetan (kumare3)