<@ULVA73B9P> I'm trying to deploy a flow in python code with: ```from prefect_demo_test import run_p...
m

Maarten

11 months ago
@Marvin I'm trying to deploy a flow in python code with:
from prefect_demo_test import run_prefect_demo_flow
from prefect.runner.storage import LocalStorage
from pathlib import Path

if __name__ == '__main__':
    # Deploy a flow
    run_prefect_demo_flow.from_source(
        source=str(Path(__file__).parent),
        entrypoint="prefect_demo_test.py:run_prefect_demo_flow"
    ).deploy(
        name='deployed-demo-image-halcon-processing-workflow',
        work_pool_name='halcon-pool'
        # tags=['halcon','demo'],
        # parameters=dict({
        #     "storage_rootpath_variable_name":"prefect_storage_filepath",
        #     "project_variable_name":"current_project_name"}),
        # description='Demo workflow processing images with halcon from a deployment',  
    )
But i get an error response what is wrong? Error: prefect.deployments.runner.DeploymentApplyError: Error while applying deployment: Client error '422 Unprocessable Entity' for url 'http://127.0.0.1:4200/api/deployments/' Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'type': 'extra_forbidden', 'loc': ['body', 'concurrency_options'], 'msg': 'Extra inputs are not permitted', 'input': None}], 'request_body': {'name': 'deployed-demo-image-halcon-processing-workflow', 'flow_id': '6cd656ec-23ab-4310-82c4-0f3b90bbfd94', 'paused': False, 'schedules': [], 'concurrency_limit': None, 'concurrency_options': None, 'enforce_parameter_schema': True, 'parameter_openapi_schema': {'title': 'Parameters', 'type': 'object', 'properties': {'storage_rootpath_variable_name': {'position': 0, 'title': 'storage_rootpath_variable_name', 'type': 'string'}, 'project_variable_name': {'position': 1, 'title': 'project_variable_name', 'type': 'string'}}, 'required': ['storage_rootpath_variable_name', 'project_variable_name']}, 'parameters': {}, 'tags': [], 'pull_steps': [{'prefect.deployments.steps.set_working_directory': {'directory': 'C:\\repos\\ai-data-pipeline'}}], 'work_queue_name': None, 'work_pool_name': 'halcon-pool', 'storage_document_id': None, 'infrastructure_document_id': None, 'description': 'Runs the prefect ai data pipeline flow\n- Gets variables to laod a metadat file\n- Read metadata file and process images\n- Update metadata and write updates to storage', 'path': None, 'version': 'c9393244be33c404894a5c4581a89651', 'entrypoint': 'prefect_demo_test.py:run_prefect_demo_flow', 'job_variables': {}}}