Anyone seen this error when trying to launch a wor...
# ask-the-community
e
Anyone seen this error when trying to launch a workflow from the UI, it appeared after clicking "Launch Workflow" after redefining the workflow's input arguments to include a FlyteFile:
n
hi Eli, can you share what the input type signature of that workflow is?
e
I figured it out. Sorry. Was due to an optional field in a dataclass having a default argument of
None
changing:
Copy code
foo: Optional[dict[str, Any] = None
to
Copy code
foo: dict[str, Any] = field(default_factory=dict)
fixed the problem
n
Nice! Does flytekit spit out a warning at local runtime/compile time for this? I feel like
dataclasses_json
might complain about this but it might be useful to bubble this up as a flytekit warning.
e
Nope. No complaint. I fixed lots of related warnings, in a library dataclass i'm wrapping, then it turned out to be an error in the dataclass I defined myself.
Weirdly
dataclasses_json
has a problem with
Union
fields but not
Optional
fields even though the latter is sugar for the former, but then it requires a multi-typed json schema field anyway so IDK?
I think it may be just a UI bug though, because I only get the form when I click on the button to render the form to fill values for a launch
155 Views