Hi All, I'm new to prefect and after making a few ...
# ask-community
d
Hi All, I'm new to prefect and after making a few refactoring to my existing flow.py. Initially, the folder structure looked the following and it was getting registered successfully (
prefect register --project my_project -p bar
)
Copy code
foo_root_folder
├── README.md
├── bar
│   └── flow.py
├── pyproject.toml
├── requirements.txt
├── setup.cfg
Since the file
flow.py
was cluttered with all utils functions required for the flow execution I refactored it into a separate python package and made calls to those functions in
flow.py
Copy code
from bar.utils import get_some_useful_function
The resultant folder looked like the following:
Copy code
foo_root_folder
├── README.md
├── bar
│   ├── __init__.py
│   ├── utils.py
│   └── flow.py
├── pyproject.toml
├── requirements.txt
├── setup.cfg
When I try to register now I am getting error as
ModuleNotFoundError: No module named 'bar'
Can anyone please let me know if anyone faced similar issues before and how they resolved it? Thanks
k
Hi @Dev Dasgupta, all storage just keeps the Flow file except for Docker storage. In order to package these custom modules, you need to add them in a container.
d
I see. Thanks, @Kevin Kho