You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cant enter lists/array into the Orion UI Custom Parameters of deployments. Get an error if I try:
prefect.exceptions.ParameterTypeError: Flow run received invalid parameters:
- capsule_ids: value is not a valid integer
- capsule_ids: value is not a valid list
from typing import Union, List
from prefect import flow
@flow(log_prints=True)
def my_flow(
some_list: Union[int, List[int]] = 5
):
if type(some_list) == int:
print(some_list)
else:
for i in some_list:
print(i)
if __name__ == "__main__":
my_flow([1,2,3])
Create Deployment
prefect deployment build test_validation.py:my_flow --name input_validation -a
In Orion UI I enter
When I hit run, I am greeted with this:
15:50:16.587 | ERROR | Flow run 'psi4-ventani-b' - Validation of flow parameters failed with error:
Traceback (most recent call last):
File "/home/usr/anaconda3/envs/mtt-prefect-env/lib/python3.9/site-packages/prefect/engine.py", line 296, in retrieve_flow_then_begin_flow_run
parameters = flow.validate_parameters(flow_run.parameters)
File "/home/usr/anaconda3/envs/mtt-prefect-env/lib/python3.9/site-packages/prefect/flows.py", line 339, in validate_parameters
raise ParameterTypeError.from_validation_error(exc) from None
prefect.exceptions.ParameterTypeError: Flow run received invalid parameters:
- some_list: value is not a valid integer
- some_list: value is not a valid list
I was able to reproduce the issue. I believe this discussion is relevant to the UI team, so I'll create an issue from this. For now, I'm glad you have a workaround!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I cant enter lists/array into the Orion UI Custom Parameters of deployments. Get an error if I try:
See also: https://discourse.prefect.io/t/flow-run-received-invalid-parameters-value-is-not-a-valid-list/2310
Beta Was this translation helpful? Give feedback.
All reactions