Hi, I've been trying out the new `flow.deploy()` f...
# ask-community
c
Hi, I've been trying out the new
flow.deploy()
function for deployments. My code is stored in Git, so I use
flow.from_source()
. Below is my deployment code:
if __name__ == '__main__':
flow.from_source(
source=GitRepository(
url="<https://dev.azure.com/MyData/Prefect-Flows/_git/Prefect2.0-Flows>",
branch="main",
credentials={
"access_token": Secret.load("devops-prefect-repo-pat").get()
}),
entrypoint="assets.py:assets_load"
).deploy(
name="Assets-Load",
description="Loads Assets into db table",
tags=["assets"],
work_pool_name="local-process-workpool",
work_queue_name="my-server",
interval=21600
)
However, upon running this, I get the following error:
File "C:\python_scripts\Prefect2.0-Flows\venv\lib\site-packages\prefect\flows.py", line 1461, in load_flow_from_entrypoint
path, func_name = entrypoint.split(":")
ValueError: too many values to unpack (expected 2)
I did some troubleshooting and printed out
entrypoint
variable in the aforementioned
flows.py
library package, and it shows the following:
C:\Users\cuet\AppData\Local\Temp\tmp7ir42eb0\Prefect2.0-Flows-main\alm_assets.py:servicenow_assets_load
As you can see from the path above, there's two
:
characters, thus the unpacking error above. This seems to only be an issue on Windows machines that contain absolute paths including the drive letter. Is this something that was overlooked or am I doing something incorrectly?
a
Tagging @alex who thinks a lot about this stuff!
👍 1
a
Hey @Carlos Cueto! This is a known issue, and there’s a PR open to fix it! I expect this fix will be included in one of the next releases.
c
Thanks @alex
Update: Seems like the PR was already merged with main branch. The fix is live. Awaiting
pip
update to the latest code now.