https://prefect.io logo
Title
w

wonsun

01/11/2023, 7:22 AM
Hi experts~! I trying to migration prefect 1.x to 2.x orion and a issue after office network re-construction. My conditions ; • prefect version == 2.6.7 • Untill last week successfully set the secret block at orion server and use that by using .get method. • The secret contains the database connection information. • Last weekend, our office had been fixed the whole wetwork. • Then i edited the secret block's('3f') value as changed the new IP address.
RuntimeWarning: coroutine 'Block.load' was never awaited
  secret_block = Secret.load('3f')
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
• So I make a new secret block and that's also don't working with below error message..
C:\Users\user\AppData\Local\Temp\ipykernel_12716\3323813457.py:3: RuntimeWarning: coroutine 'Block.load' was never awaited
  secret_block = Secret.load("new-net")
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In [27], line 6
      3 secret_block = Secret.load("new-net")
      5 # Access the stored secret
----> 6 secret_block.get()

AttributeError: 'coroutine' object has no attribute 'get'
Is there are happen to trouble by new network? Thanks for your reply.
1
c

Christopher Boyd

01/11/2023, 2:29 PM
This doesn’t look like a network issue, this looks like a code issue - the coroutine object / await would be an async / await keyword, not just an IP change. Did any version of your installation or agent, (local or remote) change as well?
:blob-attention-gif: 1
did you flow code change as well? is this defined in the flow, or outside of the flow code? If it’s within the flow, it should be properly awaited
:marvin: 1
w

wonsun

01/11/2023, 11:17 PM
Sure, the secret block is define in the flow code. But since secret block is assigned to a variable and called within the flow, so there's nothing to be updated in the code. I can't understand for 'properly awaited'. 😓 Previously, when the flow completed normally, no waiting was required to use secret block.
OMG..!! my API login key was expired.... Thanks for your help 💙