Hi all! Does anyone know why `deployment.apply()`...
# prefect-community
y
Hi all! Does anyone know why
deployment.apply()
doesn't work from a jupyter notebook cell, but does work from
.py
script file. Also, is there anyway to deploy a flow to prefect cloud using jupyter notebook ?
1
j
Have you tried
await deployment.apply()
?
1
y
Same issue unfortunately
j
Copy code
await (await deployment).apply()
👍 1
🙏 1
Both
build_from_flow
and
apply
are async function (and also sync due to a decorator they have, the issue might be there
y
That seems to have fixed it, but another issue now rises, It seems like the getattr(module, "__file__") doesn't work with jupyter notebooks as they are not considered "modules"_
j
That would by because (AFAIK) in simple terms, Jupyter is running on top of an IPython session which doesn’t “count” as a file
y
That makes sense.. anyways thank you a lot Jose for your help, that's really appreciated
j
You can track this issue and see discussion here. Feel free to leave a comment or emoji reaction at the GitHub issue.
2