https://prefect.io logo
Title
b

Bruno Grande

08/05/2022, 8:29 PM
Should there be a
.submit
after my selection in the attached screenshot? This comes up in the docs here. I thought you needed to use
.submit()
in order to obtain a future. Just wanted to check if this is a typo.
m

Mason Menges

08/05/2022, 8:56 PM
We're still working on updating some of the documentation, you no longer need to call .submit() on tasks to get the resulting output of the task 😄
b

Bruno Grande

08/05/2022, 8:59 PM
That was my understanding. But here, the
.result()
method is being used on the variable
future
on the following line, and I thought this was only possible if you used
.submit()
on a task because it would otherwise return the actual result, which probably doesn’t have a
.result()
method (e.g. a
str
or
pd.DataFrame
).
z

Zanie

08/05/2022, 9:05 PM
Yeah this example is out of date
We should address this in https://github.com/PrefectHQ/prefect/pull/6258
🙌 1
b

Bruno Grande

08/05/2022, 9:09 PM
Sounds good! I realize there are tons of small things to update, so I wanted to make sure this was caught.