https://prefect.io logo
Title
w

Will Truong

01/11/2023, 10:02 AM
I have issue with Prefect Agent Does any one have solutions? Thank you 🙌 Also, it seem like the error happens in this path :"C:\Users\Will Truong", but i don't know what the script want to open/run when access this path.
Microsoft Windows [Version 10.0.22621.963]
(c) Microsoft Corporation. All rights reserved.

D:\Athena\etl>prefect agent start "work_queue_for_test"
Agents now support multiple work queues. Instead of passing a single argument, provide work queue names with the `-q` or`--work-queue` flag: `prefect agent start -q work_queue_for_test`

Starting v2.7.4 agent with ephemeral API...

  ___ ___ ___ ___ ___ ___ _____     _   ___ ___ _  _ _____
 | _ \ _ \ __| __| __/ __|_   _|   /_\ / __| __| \| |_   _|
 |  _/   / _|| _|| _| (__  | |    / _ \ (_ | _|| .` | | |
 |_| |_|_\___|_| |___\___| |_|   /_/ \_\___|___|_|\_| |_|


Agent started! Looking for work from queue(s): work_queue_for_test...
16:18:20.487 | INFO    | prefect.agent - Submitting flow run 'fd08f02a-18ca-4538-bdf1-728dc7e88e22'
16:18:20.604 | INFO    | prefect.infrastructure.process - Opening process 'beta736-bajor'...
'C:\Users\Will' is not recognized as an internal or external command,
operable program or batch file.
16:18:20.622 | ERROR   | prefect.infrastructure.process - Process 'beta736-bajor' exited with status code: 1
16:18:20.651 | INFO    | prefect.agent - Completed submission of flow run 'fd08f02a-18ca-4538-bdf1-728dc7e88e22'
16:18:20.668 | INFO    | prefect.agent - Reported flow run 'fd08f02a-18ca-4538-bdf1-728dc7e88e22' as crashed: Flow run infrastructure exited with non-zero status code 1.
t

Tim-Oliver

01/11/2023, 10:03 AM
Can you share the command defined in your process block?
w

Will Truong

01/11/2023, 10:05 AM
Can you be more specific?
You mean this? " D:\Athena\etl>prefect agent start "work_queue_for_test" "
t

Tim-Oliver

01/11/2023, 10:27 AM
In you deployment.yaml you have a section
infrastructure
which is set to process according to your log. Inside the process block there is a section
command
. I am guessing that the command is set to
'C:\Users\Will'
which is not executable.
🙌 1
w

Will Truong

01/12/2023, 2:37 AM
No, it is Null. But I figure it out. This is because I install Python in to "C:\Users\Will Truong", and seems like my window can not figure where Python is when I start Prefect Agent (even I added Python to PATH ). And I think it is because of the space in "Will Truong". So I reinstalled Python to another folder ("D:\Athena\etl") and it worked. Thanks Tim.