Parash
01/29/2024, 12:29 PMFlow could not be retrieved from deployment.
Traceback (most recent call last):
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\prefect\engine.py", line 409, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\prefect\client\utilities.py", line 51, in with_injected_client
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\prefect\deployments\deployments.py", line 235, in load_flow_from_flow_run
await storage_block.get_directory(from_path=from_path, local_path=".")
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\prefect\filesystems.py", line 156, in get_directory
ignore_func = await self._get_ignore_func(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\prefect\filesystems.py", line 167, in _get_ignore_func
included_files = filter_files(root=local_path, ignore_patterns=ignore_patterns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\prefect\utilities\filesystem.py", line 45, in filter_files
ignored_files = {p.path for p in spec.match_tree_entries(root)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\prefect\utilities\filesystem.py", line 45, in <setcomp>
ignored_files = {p.path for p in spec.match_tree_entries(root)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pathspec\pathspec.py", line 266, in match_tree_entries
yield from self.match_entries(entries, negate=negate)
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pathspec\pathspec.py", line 159, in match_entries
for entry in entries:
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pathspec\util.py", line 181, in iter_tree_entries
yield from _iter_tree_entries_next(os.path.abspath(root), '', {}, on_error, follow_links)
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pathspec\util.py", line 251, in _iter_tree_entries_next
yield from _iter_tree_entries_next(root_full, node_rel, memo, on_error, follow_links)
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pathspec\util.py", line 251, in _iter_tree_entries_next
yield from _iter_tree_entries_next(root_full, node_rel, memo, on_error, follow_links)
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pathspec\util.py", line 251, in _iter_tree_entries_next
yield from _iter_tree_entries_next(root_full, node_rel, memo, on_error, follow_links)
File "C:\Users\ParashHallur\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pathspec\util.py", line 220, in _iter_tree_entries_next
raise RecursionError(real_path=dir_real, first_path=memo[dir_real], second_path=dir_rel)
pathspec.util.RecursionError: ('C:\\Users\\ParashHallur\\AppData\\Local', 'AppData\\Local', 'AppData\\Local\\Application Data')
Parash
01/30/2024, 10:01 AMBianca Hoch
01/30/2024, 2:38 PMParash
02/01/2024, 12:06 PMfrom DeploymentDemo import workflow
from prefect.deployments import Deployment
deployment = Deployment.build_from_flow(
flow=workflow,
name="Deployment Example - 1",
)
if __name__ == "__main__":
deployment.apply()
Parash
02/01/2024, 12:09 PMfrom prefect import flow, task
# First Task
@task
def firstTask():
print("First Task Executed")
# First Task
@task
def secondTask():
print("Second Task Executed")
# First Task
@task
def thirdTask():
print("Third Task Executed")
# Define the Prefect flow
@flow
def workflow():
print("\n Starting the workflow")
firstTask()
secondTask()
thirdTask()
print("\n Workflow Execution completed")
# Run the Prefect flow
if __name__ == "__main__":
workflow()