Gabriel Santos
04/07/2023, 2:07 AMprefect.exceptions.ScriptError: Script at 'test.py' encountered an exception: FileNotFoundError(2, 'No such file or directory')
What am i doing wrong?
My storage is on github!Chris White
prefect deployment inspect
is probably the most verbose, but the CLI command you used to build the deployment would also workChris White
Chris White
FileNotFoundError
that will help keep the channel clean - thank you!)Gabriel Santos
04/07/2023, 2:17 AMGabriel Santos
04/07/2023, 2:18 AM{
'id': '8b747014-63b1-40b2-908b-e619879ddc39',
'created': '2023-04-06T20:54:03.311565+00:00',
'updated': '2023-04-07T01:15:07.704438+00:00',
'name': 'dbt',
'version': '56814c126fc663ce6b506c5330834507',
'description': None,
'flow_id': '831f53e7-f9a4-4e62-b5c5-a09239173277',
'schedule': None,
'is_schedule_active': True,
'infra_overrides': {},
'parameters': {},
'tags': [],
'work_queue_name': 'dbt',
'parameter_openapi_schema': {'type': 'object', 'title': 'Parameters', 'properties': {}},
'path': '',
'pull_steps': [],
'entrypoint': 'test.py:hi',
'manifest_path': None,
'storage_document_id': 'f7f5e987-9e6d-469c-a9e3-7e4966b91cec',
'infrastructure_document_id': '4a50245a-ef01-424e-8ab7-b3f19175b64a',
'created_by': {'id': '0043aef4-727e-4e86-a979-45fcb878ad3a', 'type': 'USER', 'display_value': 'gabrielsantosoicocombr'},
'updated_by': {'id': '0043aef4-727e-4e86-a979-45fcb878ad3a', 'type': 'USER', 'display_value': 'gabrielsantosoicocombr'},
'work_pool_name': 'default-agent-pool',
'infrastructure': {'type': 'process', 'env': {}, 'labels': {}, 'name': None, 'command': None, 'stream_output': True, 'working_dir': None, 'block_type_slug': 'process'}
}
Gabriel Santos
04/07/2023, 2:18 AMChris White
test.py
located at the root of your repository?Gabriel Santos
04/07/2023, 2:20 AMChris White
prefect==2.10.1
on both your local environment and also your EC2 environment.
In EC2, run prefect worker start -t process -p ec2-work
(this will create a work pool called "ec2-work")
On your local machine, from the root of your repository, run:
rm deployment.yaml # delete old deployment yaml file for now
prefect project init --recipe git
prefect deploy test.py:hi -n dbt -p ec2-work
I'm fairly certain that with only those changes your deployment will be healthy again on your EC2 instance, but if you run into an error please let me know!Chris White
Gabriel Santos
04/07/2023, 2:37 AMGabriel Santos
04/07/2023, 2:37 AMGabriel Santos
04/07/2023, 2:38 AMChris White
nohup
, or supervisord
or even screen
to do so. This is a pretty common request so I'll make a note of it and see if we can offer a --detach
flag for workers to do this nativelyGene
06/21/2023, 7:50 PMGene
06/21/2023, 9:34 PM