Moises Vera
03/09/2022, 2:23 AMextract_data.py
flow file (config for the flow)
▪︎ here I import the tasks directory with a simple import tasks
◦ tasks
at the same level, a directory with my tasks
◦ When I register this flow it works correctly in schedule basis
• I just added a new flow calculate_something.py
• The tasks for this flow are in the tasks
directory too
• now when I want to run this new flow I get FlowStorageError('An error occurred while unpickling the flow:\n ModuleNotFoundError("No module named \'tasks\'")
What I don't get is... Why is it working for the first flow and not for this new one?
Any ideas? I appreciate itKevin Kho
03/09/2022, 3:38 AMAnna Geller
03/09/2022, 10:06 AMprefect agent local start -p /Users/you/Desktop/prefect/tasks/
Check out this thread for more information on that error - to help you in your use case, I added an extra section for you! 🙂
https://discourse.prefect.io/t/when-i-run-my-flow-i-see-an-error-failed-to-load-and-exe[…]derror-no-module-named-users-username-what-is-happening/33Moises Vera
03/09/2022, 6:30 PMKevin Kho
03/14/2022, 6:00 PMflow.run_config = LocalRun(working_dir="/path/to/working-directory")
But that setup looks good. Maybe what you can do is start a python interpreter in that directory and see if the imports work? The calculate_something
is in the same directory as extract_data
right?