Avi
07/04/2023, 3:16 PMWorker 'KubernetesWorker 0c71c16f-d861-467d-b6fc-761b01a5ea66' started!
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
return call()
^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 383, in __call__
return self.result()
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 283, in result
return self.future.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 169, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 346, in _run_async
result = await coro
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/worker.py", line 129, in start
await worker.sync_with_backend()
File "/usr/local/lib/python3.11/site-packages/prefect/workers/base.py", line 690, in sync_with_backend
await self._update_local_work_pool_info()
File "/usr/local/lib/python3.11/site-packages/prefect/workers/base.py", line 647, in _update_local_work_pool_info
work_pool = await self._client.read_work_pool(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/client/orchestration.py", line 2183, in read_work_pool
response = await self._client.get(f"/work_pools/{work_pool_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/site-packages/prefect/client/base.py", line 280, in send
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/prefect/client/base.py", line 138, in raise_for_status
raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '403 Forbidden' for url '<https://api.prefect.cloud/api/accounts/24dda59a-eee1-4d84-8c71-075633a3a0f3/workspaces/2fecb2ed-8785-4c2e-a324-84c4283cb332/work_pools/default-agent-pool>'
Response: {'detail': 'Unauthorized'}
For more information check: <https://httpstatuses.com/403>
An exception occurred.
Checked the health of my key by this and I see {"detail":"Not authenticated"}
Not sure where to go from here???Christopher Boyd
07/05/2023, 2:12 PMprefect profile inspect
to verify what is being used. I would double check that the API key you are using is valid for the account + workspace you are trying to use it with.
An example of where this could be problematic is if you have two workspaces, and are using an api key for one workspace, that was created for another