https://prefect.io logo
Title
r

Robert Esteves

12/23/2022, 6:55 PM
How do I import a function from another file in a Prefect 1.0 script? My Prefect script is stored in a folder in my repo. I also stored the function script within the same folder, but whenever I try to execute the Flow from Prefect IO it fails (No Module Found Error) here is my example: github |_my_repo|_ |folder| |function file |my flow
m

Mason Menges

12/23/2022, 7:31 PM
Hey @Robert Esteves you'll likely want to use script-based flow storage for this https://docs-v1.prefect.io/core/idioms/script-based.html. That being said if you're able to prefect 2 is much more robust when it comes to dealing with local imports