<#5236 [BUG] flytekitplugins-pydantic errors when ...
# flytekit
c
#5236 [BUG] flytekitplugins-pydantic errors when a pydantic class is used as an input on the main workflow called remotely. Issue created by artgramlich ### Describe the bug When a workflow contains an input that is a Pydantic type, calling the workflow remotely errors with due to a None type. This does not happen when the workflow is run locally or in a when a Pydantic type is an input parameter in a subworkflow or task. Some simple debugging shows that the error originates in the flytekitplugins/pydantic/basemodel_transformer.py in the to_python_value on this bit of code:
basemodel_literals: BaseModelLiterals = lv.map.literals
with lv.map being None. ### Expected behavior When a workflow input is a Pydantic type, that the type is unmarshalled from json into the Pydantic type. ### Additional context to reproduce I've created a public repo with a simple test case that triggers this at https://github.com/artgramlich/flyte-complex-types-problem and am attaching a zip of the code. This repo/code also contains some patched files that show the lower level error that causes the issue. flyte-complex-types-problem-main.zip ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte