Prefect 2.0 testing issue

I was trying to test this basic flow after installing Prefect 2.0.

from prefect import flow, get_run_logger


@flow(name="Testing")
def basic_flow():
    logger = get_run_logger()
    logger.warning("The fun is about to begin")


if __name__ == "__main__":
    basic_flow()

When i run this I get an error:

18:10:19.876 | INFO    | prefect.engine - Created flow run 'groovy-tiger' for flow 'Testing'
18:10:19.877 | INFO    | Flow run 'groovy-tiger' - Using task runner 'ConcurrentTaskRunner'
18:10:20.119 | ERROR   | Flow run 'groovy-tiger' - Crash detected! Execution was interrupted by an unexpected exception.
after the call stack, the message is:
 
 raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '405 Method Not Allowed' for url 'https://api-beta.prefect.io/api/accounts/59f8c8ed-9fdb-4b85-a77f-7d7843cba9b4/workspaces/b5d141f2-ce95-40cb-af1a-68d3045bfd47/block_documents
/get_default_storage_block_document'

Any idea what could be the issue?

I did create storage using prefect storage using Azure blob.
I am connected to prefect cloud beta as well and can see the failures / crashes there as well. Interestingly the first flow run was fine but started failing since then.

Which version of Prefect are you using? Can you try running it again to see if it persists?

1 Like

As Andrew correctly said, sharing the output of prefect version can help us identify the issue

also, check out this announcement which explains the current status of Prefect 2.0:

Version: 2.0b8
API version: 0.7.0
Python version: 3.8.5
Git commit: 4b8dfc35
Built: Fri, Jul 8, 2022 8:53 AM
OS/Arch: win32/AMD64
Profile: default
Server type: hosted

Maybe you can try removing ~/.prefect/profile.toml to refresh if it still doesn’t work. I also recommend upgrading.

2 Likes