Matias Godoy
09/02/2020, 1:50 PMLast State Message
[2 Sep 2020 3:24pm]: Failed to load and execute Flow's environment: FileNotFoundError(2, 'No such file or directory')
josh
09/02/2020, 1:54 PMMatias Godoy
09/02/2020, 1:55 PMjosh
09/02/2020, 1:55 PMMatias Godoy
09/02/2020, 1:56 PMfrom time import sleep
josh
09/02/2020, 1:56 PMMatias Godoy
09/02/2020, 1:57 PMimport prefect
from prefect import Flow, Parameter
from prefect.tasks.control_flow.conditional import merge
from prefect.tasks.control_flow.case import case
def main() -> None:
with Flow('Full inspection') as flow:
env = Parameter('env', default='DEV', required=False)
user_token = Parameter('user_token')
inspection_id = Parameter('inspection_id')
is_video = Parameter('is_video', default=False, required=False)
# some tasks
# Register the flow in Prefect Cloud
flow.register(project_name='Inspect')
if __name__ == '__main__':
main()
josh
09/02/2020, 2:03 PMMatias Godoy
09/02/2020, 2:04 PMjosh
09/02/2020, 2:04 PMMatias Godoy
09/02/2020, 2:04 PMjosh
09/02/2020, 2:05 PMMatias Godoy
09/02/2020, 2:05 PMprefect agent start --label inspect-agent-2 --label prod --token aaa -p /home/ubuntu/inspect-prefect-orchestrator/flows/inspection
josh
09/02/2020, 2:07 PMMatias Godoy
09/02/2020, 2:07 PMjosh
09/02/2020, 2:08 PM~/.prefect/flows/
Matias Godoy
09/02/2020, 2:08 PMjosh
09/02/2020, 2:10 PM--show-flow-logs
flag to see more of the traceback from where the error is raised?Matias Godoy
09/02/2020, 2:12 PM[2020-09-02 14:17:23,189] INFO - agent | Found 1 flow run(s) to submit for execution.
2020-09-02 14:17:23,873 DEBG 'prefect-agent-1' stdout output:
[Errno 2] No such file or directory: '/Users/matto/.prefect/flows/full-inspection.prefect'
2020-09-02 14:17:23,925 DEBG 'prefect-agent-1' stdout output:
Traceback (most recent call last):
File "/usr/bin/prefect", line 11, in <module>
sys.exit(cli())
File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.6/site-packages/prefect/cli/execute.py", line 80, in cloud_flow
raise exc
File "/home/ubuntu/.local/lib/python3.6/site-packages/prefect/cli/execute.py", line 69, in cloud_flow
flow = storage.get_flow(storage.flows[flow_data.name])
File "/home/ubuntu/.local/lib/python3.6/site-packages/prefect/environments/storage/local.py", line 77, in get_flow
return prefect.core.flow.Flow.load(flow_location)
File "/home/ubuntu/.local/lib/python3.6/site-packages/prefect/core/flow.py", line 1335, in load
with open(str(fpath), "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/matto/.prefect/flows/full-inspection.prefect'
2020-09-02 14:17:25,027 DEBG 'prefect-agent-1' stdout output:
[2020-09-02 14:17:25,027] INFO - agent | Process PID 1464 returned non-zero exit code
josh
09/02/2020, 2:20 PMMatias Godoy
09/02/2020, 2:21 PMjosh
09/02/2020, 2:21 PM.register
?Matias Godoy
09/02/2020, 2:22 PMjosh
09/02/2020, 2:22 PMMatias Godoy
09/02/2020, 2:22 PMjosh
09/02/2020, 2:22 PMMatias Godoy
09/02/2020, 2:22 PMjosh
09/02/2020, 2:22 PMMatias Godoy
09/02/2020, 2:23 PMjosh
09/02/2020, 2:23 PMMatias Godoy
09/02/2020, 2:24 PMValueError: Flow is not contained in this Storage
josh
09/02/2020, 2:38 PMMatias Godoy
09/02/2020, 2:40 PMprefect agent start --label inspect-agent-2 --label prod --token [my_token] -p /home/ubuntu/inspect-prefect-orchestrator/flows/inspection
josh
09/02/2020, 3:00 PMMatias Godoy
09/02/2020, 3:00 PMpip install --upgrade prefect
command to keep the agents up to datejosh
09/02/2020, 3:04 PMMatias Godoy
09/02/2020, 3:05 PMjosh
09/02/2020, 3:10 PMMatias Godoy
09/02/2020, 3:13 PM