Eivind Hyldmo
10/10/2023, 7:24 AMValidation of flow parameters failed with error:
Traceback (most recent call last):
File "/home/ec2-user/.local/lib/python3.7/site-packages/prefect/engine.py", line 304, in retrieve_flow_then_begin_flow_run
parameters = flow.validate_parameters(flow_run.parameters)
File "/home/ec2-user/.local/lib/python3.7/site-packages/prefect/flows.py", line 351, in validate_parameters
raise ParameterTypeError.from_validation_error(exc) from None
prefect.exceptions.ParameterTypeError: Flow run received invalid parameters:
- country: none is not an allowed value
The default value is specified in in the deployment yaml file, as well as the annotated function:
@flow # vvvvvvvvvv
def get_domain(list_id: str, workflow_id: str, workflow_run_id: str, country: str = "no", block_name: str = "db-prod-prospects", batch_size: int = 95):
connector = SqlAlchemyConnector.load(block_name)
Shouldn’t that be enough? Also when the jobs failed, the parameter tab shows:
{
"country": null,
...
}
Could it be that is has to be undefined, not null perhaps?