Hello All,
Thanks in advance .
I am getting an error while using flow.from_source with Git repo. Module not found.
Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/tmp/tmpwp9f0k88prefect/branch/src/flows/simpletest_git_p2/simpletest_git_p2.py", line 12, in <module>
from botocore.exceptions import ClientError
ModuleNotFoundError: No module named 'botocore'
Its running fine once I commented out the package botocore . I saw an option env, but i don't know how / where to write. Dockerfile is also in the git repo. I do have a docker image with all required pip list. Below is the code used .
if __name__ == "__main__":
simpletest_git_p2.from_source(
source=GitRepository(
url="<https://github.cms.gov/gitrepo.git>",
branch="branch",
credentials={
"access_token": Secret.load("github-access-token")
}
),
entrypoint=f"src/flows/{flow_name}/{flow_name}.py:{flow_name}",
).deploy(
name="private-git-storage-deployment",
work_pool_name="workpool",
build=False
)