Cody
09/25/2023, 5:33 PMFelix Vadan
09/25/2023, 6:05 PMEric
09/25/2023, 6:25 PMCody
09/25/2023, 7:05 PMEric
09/25/2023, 7:55 PMCody
09/25/2023, 8:13 PMCrash details:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 1948, in report_task_run_crashes
yield
File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 1536, in begin_task_run
await check_api_reachable(
File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 2399, in check_api_reachable
connect_error = await client.api_healthcheck()
File "/usr/local/lib/python3.10/site-packages/prefect/client/orchestration.py", line 330, in api_healthcheck
await self._client.get("/health")
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/prefect/client/base.py", line 251, in send
response = await self._send_with_retry(
File "/usr/local/lib/python3.10/site-packages/prefect/client/base.py", line 193, in _send_with_retry
response = await request()
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1617, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 76, in handle_async_request
stream = await self._connect(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 124, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
File "/usr/local/lib/python3.10/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp
return await self._backend.connect_tcp(
File "/usr/local/lib/python3.10/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 221, in connect_tcp
await event.wait()
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1778, in wait
if await self._event.wait():
File "/usr/local/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError
Cody
09/26/2023, 5:47 AMNimesh
09/26/2023, 6:14 AMNoam Banay
09/26/2023, 1:01 PMVinicius Gambi
09/26/2023, 2:05 PMVinicius Gambi
09/26/2023, 2:10 PMJames
09/26/2023, 4:32 PMJosh Paulin
09/26/2023, 9:56 PMCody
09/26/2023, 10:57 PMKyle
09/27/2023, 3:36 AMradek jezek
09/27/2023, 9:09 AMPrabhatGupta
09/27/2023, 11:00 AMShane Breeze
09/27/2023, 12:45 PMAndrei Rediu
09/27/2023, 1:12 PMJetta
09/27/2023, 1:53 PMEric
09/27/2023, 3:05 PMKyle
09/27/2023, 3:24 PMVinicius Gambi
09/27/2023, 5:55 PMNimesh
09/27/2023, 6:24 PMprefecthq/prefect:2-python3.10
Docker image. I take the base image, install our requirements, and copy a flows
directory with all of our flows as Python modules into the /opt/prefect/flows
directory in the Docker image. I use a prefect.yaml
deployment file to deploy the flow. This all works fine and the worker shows as healthy, but when a flow is triggered, I get the error:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/prefect/flows'
Ryan Peden
09/27/2023, 6:26 PMJoe D
09/27/2023, 7:05 PMDavid Maxson
09/27/2023, 7:08 PM<http://marvin.ai|marvin.ai>_fn
decorator, is there any built-in way to cache the function results so I don't incur costs for duplicate inputs?Vinicius Gambi
09/27/2023, 7:28 PMKyle
09/27/2023, 7:35 PMKiley Roberson
09/27/2023, 11:23 PMPREFECT_API_URL=f"<https://api.prefect.cloud/api/accounts/{account_id}/workspaces/{workspace_id}>"
async def test():
deployment_id = UUID("MY-DEPLOYMENT-ID")
client = PrefectClient(api=PREFECT_API_URL, api_key=API_KEY)
await client.create_flow_run_from_deployment(deployment_id=deployment_id, parameters={"connection_id": "connection_id"})
if __name__ == "__main__":
asyncio.run(test())
But am getting the following error
Client error '403 Forbidden' for url '<https://api.prefect.cloud/api/accounts/MY-ACCOUNT-ID/workspaces/MY-WORKFLOW-ID/deployments/MY-DEPLOYMENT-ID/create_flow_run>'
Why might I get this error?