I get the following error for `prefect block ls`:
# prefect-community
t
I get the following error for `prefect block ls`:
1
Copy code
Traceback (most recent call last):
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
    return fn(*args, **kwargs)
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 193, in wrapper
    return run_async_in_new_loop(async_fn, *args, **kwargs)
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 140, in run_async_in_new_loop
    return anyio.run(partial(__fn, *args, **kwargs))
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/prefect/cli/block.py", line 162, in block_ls
    blocks = await client.read_block_documents()
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/prefect/client.py", line 1304, in read_block_documents
    response = await <http://self._client.post|self._client.post>(
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/httpx/_client.py", line 1842, in post
    return await self.request(
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/httpx/_client.py", line 1527, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/prefect/client.py", line 280, in send
    response.raise_for_status()
  File "/home/tibuch/Apps/miniconda3/envs/eicm-dev/lib/python3.8/site-packages/prefect/client.py", line 226, in raise_for_status
    raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '<https://app.prefect.cloud/account/xxx/workspace/yyy/block_documents/filter>'
For more information check: <https://httpstatuses.com/404>
An exception occurred.
I noticed that app.prefect.cloud/account/xxx/workspace/yyy/block exists but app.prefect.cloud.account/xxx/workspace/yyy/block_documents does not exist. Am I doing something wrong or is there a bug? Okay, either something happened on your end or the following sequence of commands fixed it:
Copy code
prefect cloud workspace set --workspace "...."
prefect profile inspect
Then I executed a flow locally and it showed up in the cloud interface. Then I executed
prefect block ls
again and this time it worked.
👍 2
1
j
Glad to hear it worked @Tim-Oliver! Are you able to move your code to the thread to help keep the channel tidy?
👍 1