<@ULVA73B9P> Flow run failed with "Submission fail...
# ask-marvin
m
@Marvin Flow run failed with "Submission failed. ValidationError: 1 validation error for Process\ncommand\n value is not a valid list (type=type_error.list)" Do you know what this message could mean? Flow fails to start, run_spider works localy azure-pipelines.yml is steps: - bash: echo "##vso[task.setvariable variable=PIP_EXTRA_INDEX_URL]${PIP_EXTRA_INDEX_URL:1}" displayName: Fix pip url - bash: python -m pip install -U pip setuptools displayName: Install build tools - bash: pip install -r requirements.txt displayName: Install requirements - bash: | export PYTHONPATH=$(pwd):$PYTHONPATH prefect cloud login --key pnu_ey1Jcb6Yp26oQLQIRfakehiY16GdsH42um3U --workspace 'rai-flows-dev/default' python scripts/deploy.py displayName: deploy flows deploy.py is azure_blob_storage_container_block = AzureBlobStorageContainer.load( "rai-default-flows-storage" ) Deployment.build_from_flow( flow=run_spider, name="price-scrap", work_pool_name="default-agent-pool", work_queue_name="product-scrap", storage=azure_blob_storage_container_block, apply=True, path=f"price-scrap-store-4", )
m
The error
value is not a valid list (type=type_error.list)
usually occurs when a field expected to be a list in the deployment configuration is not provided as such. This might be related to one of the parameters in your deployment where a list is expected. In your script, you're using
Deployment.build_from_flow
which is deprecated. You should use
Flow.deploy()
instead. This is likely not the direct issue, but it's good to use updated methods. Here’s an example of how you could modify your
deploy.py
script:
Copy code
python
from prefect.deployments import Deployment
from prefect.filesystems import AzureBlobStorage

azure_blob_storage_container_block = AzureBlobStorage.load("rai-default-flows-storage")

deployment = Deployment.build_from_flow(
    flow=run_spider,
    name="price-scrap",
    work_pool_name="default-agent-pool",
    work_queue_name="product-scrap",
    storage=azure_blob_storage_container_block,
    apply=True,
    path="price-scrap-store-4",
)

deployment.apply()
Make sure that all parameters that are expected to be lists (such as
command
in some job configuration) are provided as lists. For example, in shell commands ensure they are listed properly:
Copy code
python
commands = ["command1", "command2"]
Further references: - GitHub Issue on similar error If you follow this and ensure proper parameter passing, it should resolve the validation error. Would you like more detailed assistance on a specific part or more debugging tips?