<@ULVA73B9P> My scheduled workflow is experience e...
# ask-marvin
k
@Marvin My scheduled workflow is experience empty config error. But my input param is a pydantic model (config) with default values. Why is erroring on missing the entire pydantic model? The parameters is {} on the UI
Copy code
Validation of flow parameters failed with error: 
Traceback (most recent call last):
  File "/home/venvs/.venv/lib/python3.11/site-packages/prefect/engine.py", line 452, in retrieve_flow_then_begin_flow_run
    parameters = flow.validate_parameters(flow_run.parameters)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/venvs/.venv/lib/python3.11/site-packages/prefect/flows.py", line 555, in validate_parameters
    raise ParameterTypeError.from_validation_error(exc) from None
prefect.exceptions.ParameterTypeError: Flow run received invalid parameters:
 - config: field required
m
It appears that there could be an issue related to the configuration and validation of parameters for your Prefect workflow. Prefect schedules, as well as variable parameter types like pydantic models, have certain requirements and acceptable formats that must be observed. However, the excerpts found do not directly address the specific issue regarding Pydantic models and their defaults in the context of scheduled workflows. It might be beneficial to further explore the Prefect documentation or community discussions specifically regarding: 1. Pydantic model integration with Prefect. 2. Parameter validation and defaults in Prefect scheduled workflows. If you are unable to resolve the error using the provided documentation, searching for related issues on the Prefect GitHub repository might unearth discussions or resolutions related to similar errors. Would you like me to search GitHub issues for more context on this specific error regarding Pydantic models in Prefect workflows?
k
@Nate Not sure if this is a bug with the cron scheduled workflows. When the input for the flow is a pydantic model, the scheduled workflows simply return a
{}
, regardless having default values. I have tried with no pydantic model and just args for the input, and that works fine with default values. Is this a bug that's introduced or am I doing something wrong?