Sam Garvis
08/16/2022, 5:45 PMSecret.load("slackbot-oauth").get()
, I get AttributeError: 'coroutine' object has no attribute 'get'
whether I run this in an ipynb or with a python file through the terminal.
Is it expected to run this command with await and async?
Or is this not supposed to happen?Andrew Huang
08/16/2022, 5:51 PMfrom prefect.blocks.system import Secret
secret = Secret.load("test")
print(secret.get())
await
, or wrap it in a flow to automatically handle.
from prefect import flow
from prefect.blocks.system import Secret
@flow
def test_flow():
secret = Secret.load("test").get()
return secret
print(test_flow())
Sam Garvis
08/16/2022, 6:32 PM