-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'coroutine' object has no attribute 'value' #15086
Comments
Update: I added # I got this warning
RuntimeWarning: coroutine 'Block.load' was never awaited
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Deploying deck_id │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
$HOME/Library/Caches/pypoetry/virtualenvs/templisher-4hu7XBP5-py3.11/lib/python3.11/site-packages/prefect/utilities/importtools.py:511: RuntimeWarning: coroutine 'Block.load' was never awaited
logger.debug("Failed to compile: %s", e)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
15:32:02.379 | WARNING | griffe - <module>:3: Failed to get 'name: description' pair from 'deck_id -- the name of the deck. These are listed in decks.yaml, and named in the file'
15:32:02.380 | WARNING | griffe - <module>:4: Failed to get 'name: description' pair from ''deck_id.yaml'.'
$HOME/Library/Caches/pypoetry/virtualenvs/templisher-4hu7XBP5-py3.11/lib/python3.11/site-packages/prefect/flows.py:1693: RuntimeWarning: coroutine 'Block.load' was never awaited
if flow is None:
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
15:32:02.382 | WARNING | griffe - <module>:3: Failed to get 'name: description' pair from 'deck_id -- the name of the deck. These are listed in decks.yaml, and named in the file'
15:32:02.382 | WARNING | griffe - <module>:4: Failed to get 'name: description' pair from ''deck_id.yaml'.'
Running deployment build steps... Seems like the deployments will still run though...update to come. Update: Yup, the deployment (with many subflows and tasks) completed successfully. Looks the the warnings on deployment did not result in errors. This required that I put |
Hey @mahiki - yea, I haven't figured out what the precise change in async logic was that caused these coroutines to stop getting run synchronously under certain situations, but you're correct that the recommended solution is to set It looks like you've already seen this, but for others who comes along we plan to roll out more explicit dual interfaces for sync/async code to avoid these inevitable edge cases: #15008 I'm going to close this issue as the |
Bug summary
I upgraded from 2.16.0 -> 2.20.3. All tests pass, but when I try to create deployments I get that async error like in #14712.
I think this was resolved in 2.19.9, or maybe this is a different but similar problem.
utility.py
is a dependency of a flow I am deploying:ddl.py
imports the utility.py module abovePartial stacktrace
Version info (
prefect version
output)Additional context
I think I could try rolling back from 2.20.3 -> 2.19.9, or I saw somewhere I could try:
Or perhaps I just need to move that Block.load into into the flow definition where it it used. I'd rather not do that, as I prefer to pull the string out as a variable declaration.
The text was updated successfully, but these errors were encountered: