https://prefect.io logo
Title
a

Alec Taggart

05/23/2023, 7:09 PM
Hello all! 👋 I am really struggling to setup a deployment for my bitbucket repo. I have already setup a "BitBucket Credentials" block and a "BitBucket Repository" block and am creating my deployment as follows:
bitbucket_repository_block = BitBucketRepository.load("prefect-bitbucket-repo")

deployment = Deployment.build_from_flow(
    flow           = test_flow,
    name           = "test_deployment",
    work_pool_name = "default-agent-pool",
    storage        = bitbucket_repository_block,
    path           = "/tmp/prefect/",
    entrypoint     = "flows/test.py:test_flow",
    tags=["DEV"]
)

deployment.apply()
However when I deploy this and start a run, the agent generates this error:
12:48:47.460 | INFO    | Flow run 'cornflower-leopard' - Downloading flow code from storage at '/tmp/prefect/'
12:48:48.987 | ERROR   | Flow run 'cornflower-leopard' - Flow could not be retrieved from deployment.
...
...
distutils.errors.DistutilsFileError: cannot copy tree '/tmp/prefect': not a directory
Any ideas?