```Traceback (most recent call last): File "/usr...
# ask-community
j
Copy code
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/prefect/cli/_utilities.py", line 41, in wrapper
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/prefect/utilities/asyncutils.py", line 205, in coroutine_wrapper
    return run_async_in_new_loop(async_fn, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/prefect/utilities/asyncutils.py", line 156, in run_async_in_new_loop
    return anyio.run(partial(__fn, *args, **kwargs))
  File "/usr/local/lib/python3.8/dist-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/usr/local/lib/python3.8/dist-packages/prefect/cli/cloud.py", line 429, in login
    workspace = current_workspace or workspaces[0]
IndexError: list index out of range
1
m
looks like you need to create a workspace from what I can tell
Copy code
workspace = current_workspace or workspaces[0]
IndexError: list index out of range
j
But I have a cloud workspace - and there is no where to specify a workspace, that I can see. Maybe in the setting up of the API key? I'll look.
I just saw that there is a --workspace flag, so that's good. However, it says my workspace doesn't exist.
r
Hey @Jason Noxon!! Are you able to see your workspace in the Cloud UI (you can see workspaces in the UI by clicking this logo on the left side)? What Prefect version are you on? You can see this by running
prefect version
j
Hi, @Rob Freedy - Yes, I am.
And the handles are correct.
r
I am able to recreate this error by attempting to login to an account that doesn't have any workspaces. Are you able to create another API Key from the account that has access to that workspace and attempt to login using this command
prefect cloud login -k <new_key>
j
I am not convinced that I set up the key correctly - so yes... 🙂
@Rob Freedy Thank you, Rob - that did it.
🦜 1
👍 1
🔥 1
r
My pleasure!
1