Braun Reyes
11/02/2023, 8:22 PMTraceback (most recent call last):
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
return call()
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 382, in __call__
return self.result()
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 282, in result
return self.future.result(timeout=timeout)
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 168, in result
return self.__get_result()
File "/Users/mozilla/.pyenv/versions/3.10.7/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 345, in _run_async
result = await coro
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/cli/deploy.py", line 292, in deploy
await _run_single_deploy(
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/client/utilities.py", line 51, in with_injected_client
return await fn(*args, **kwargs)
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/cli/deploy.py", line 368, in _run_single_deploy
flow = await register_flow(deploy_config["entrypoint"])
File "/Users/mozilla/projects/moso-data-ops-poc/data-flows/.venv/lib/python3.10/site-packages/prefect/deployments/base.py", line 330, in register_flow
if flow.name in flows and flows[flow.name] != entrypoint:
AttributeError: 'Flow' object has no attribute 'name'
Marvin
11/02/2023, 8:22 PMFlow
object not having a name
attribute. This could be because the Flow
was not properly initialized with a name.
In Prefect, you typically define a flow with a name like this:
@flow(name="Hello Flow")
def hello_world(name="world"):
message = print_hello(name)
my_subflow(message)
In the above example, "Hello Flow" is the name of the flow. If you're trying to access the name
attribute of a Flow
object, make sure the flow was initialized with a name. If it wasn't, you'll see the AttributeError: 'Flow' object has no attribute 'name'
error message.
If you're still having trouble, I recommend checking the Prefect documentation or their community forum for more help.