https://prefect.io logo
b

Bharath Ballamudi

07/31/2022, 8:38 AM
I have a question: I have been using Prefect to run pipelines with no problems until recently. However, a colleque of mine wanted to try the email notification and had installed prefect-email. Now I keep getting import error while running the existing code to run the pipeline that was working just fine before installing prefect-email. from prefect import task, Flow, Parameter Exception has occurred: ImportError cannot import name 'Parameter' from 'prefect' (/home/ubuntu/.pyenv/versions/3.8.10/lib/python3.8/site-packages/prefect/__init__.py) We are using prefect 2.0.1. Tried downgrading to 2.0.0 as well as tried clean installations many times with no luck. Could someone help diagnose the issue and help me resolve it?
a

Anna Geller

07/31/2022, 8:57 AM
from prefect import task, Flow, Parameter
this is syntax for Prefect 1.0 only for 2.0 check out docs.prefect.io
k

Khuyen Tran

07/31/2022, 4:26 PM
You can checkout tutorial on how to send notifications on 2.0 here
6 Views