https://prefect.io logo
Title
a

André Dias

05/17/2023, 2:31 PM
Hello again guys, sorry to bother but I came across another issue and couldn’t find a way to solve it. I’m trying to spin a Prefect Agent in a Docker Container, setting up the correct env vars in the form of:
PREFECT_API_KEY=[my_key]
PREFECT_API_URL=<https://api.prefect.cloud/api/accounts/{account_id}/workspace/{workspace_id}>
When I try to spin up the container, I always get a not found
Response: {'detail': 'Not Found'}
response even though it exists.
prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '<https://api.prefect.cloud/api/accounts/{account_id}/workspace/{workspace_id}/flow_runs/filter>'
If I spin the command (in this case
prefect agent start --pool template-dev --work-queue dev
) in my local machine outside a container it works fine. I have the same values I get in
prefect config view
while spinning up the Docker Container. Can anyone help with this?
1
t

Taylor Curran

05/17/2023, 2:33 PM
Hi André 🙂 Looks like you have
accounts/
twice in the URL of the error message, this may be the issue.
a

André Dias

05/17/2023, 2:35 PM
Hi @Taylor Curran, that was a copy/paste mistake 🙂 I fixed it, so the error still applies.
Here’s an image for the error message that I receive:
c

Christopher Boyd

05/17/2023, 2:41 PM
can you do me a favor and test that your url and api key are good?
a

André Dias

05/17/2023, 2:47 PM
Thanks @Christopher Boyd, my API key is still valid but I found the issue - a simple typo in my path -> workspace instead of workspaces. Sorry about it and thanks for all the help 🙂
🙌 1
1
:blob-attention-gif: 1