Am seeing this exception while trying to run a sim...
# ask-community
t
Am seeing this exception while trying to run a simple flow:
Copy code
File "/opt/conda/envs/coiled/lib/python3.9/site-packages/prefect/client/base.py", line 125, in raise_for_status
Exception: PrefectHTTPStatusError("Client error '404 Not Found' for url '<http://ephemeral-orion/api/task_runs/add94276-cb3e-417d-a3f9-033f935ae5ec/set_state>'\nResponse: {'exception_message': 'Task run with id add94276-cb3e-417d-a3f9-033f935ae5ec not found'}\nFor more information check: <https://httpstatuses.com/404>")
Any ideas as to what might cause this?
1
values for PREFECT_API_KEY and PREFECT_API_URL were wrong. all good now.
🔥 1
b
Glad you arrived at a solution!
t
are the API keys one-time use only?
m
Nope you can use them in whatever capacity you deem necessary as frequently as you wish, there is no way to retrieve it if you lose track of the key but they aren't limited to 1 time use.
blob attention gif 1
t
i have attempted to reuse them but they never seem to work the 2nd time.
m
Are you seeing these same or similar errors in those cases, I can definitively say there's no limit on the number of time you can use an API Key, you can set an expiration for them when they're created, they can also be deleted but assuming the API key is still active through cloud and you still have access to it there's no limit on the number of times it's used.
t
pretty consistent behavior but not in the mood to test it now that my flows are working 😉
m
Fair Enough 😄 Some preliminary thoughts if/when you do run into these issues, is this part of a CI/CD process, are you setting the API_URL and API_KEY during that process, seeing this URL
Copy code
<http://ephemeral-orion/api/task_runs/add94276-cb3e-417d-a3f9-033f935ae5ec/set_state>
indicates that the API is not pointing to a Cloud or Local Orion instance so it's generating an Ephemeral api instead so there may be something misconfigured during that setup.
t
mostly i have just logged in using prefect cloud login
but will pay more attention from now on. will follow up as we begin to define our build pipelines starting next week.
m
For sure, we're always happy to help 😄
t
really appreciate the support of the prefect folks. you folks are awesome!
hattip 1