https://flyte.org logo
#ask-the-community
Title
# ask-the-community
r

Rezwan Abir

06/16/2023, 6:40 PM
hey folks, below is the folder structure pdi/ src/ pdi_flyte/ flyte/ utils/ workflows/ ingest_flyte.py export PYTHONPATH=/Users/rezwan.abir/pdi/src/ (local, works fine when
pyflyte run
is used) in ingest_flyte.py we have
from pdi_flyte.flyte.workflows.constants
import ConflictActionList` however after packaging and deploying I'm getting ModuleNotFoundError: No module named 'pdi_flyte` any ideas?
k

Kevin Su

06/16/2023, 6:45 PM
you need to add init.py to workflows/ and flyte/ folder
r

Rezwan Abir

06/16/2023, 6:46 PM
it's there already
you mean
__init__.py
also in Dockerfile I have
ENV _PYTHONPATH_ /root
k

Kevin Su

06/16/2023, 7:06 PM
how do you package it, pyflyte register or pyflyte package?
r

Rezwan Abir

06/16/2023, 8:31 PM
pyflyte --pkgs flyte.workflows package --image komodohealth/pdi-dataset-management:flyte-0.0.10.rez-dev -f
and then flytectl register files --config /Users/rezwan.abir/.flyte/config.yaml --destinationDirectory . --project flytesnacks --domain development --archive flyte-package.tgz --version flyte-0.0.10.rez-dev
k

Kevin Su

06/16/2023, 8:59 PM
could you try
pyflyte --pkgs pdi_flyte.flyte.workflows …
r

Rezwan Abir

06/17/2023, 7:31 AM
same issue 😞
i checked into docker container for folder structure
root init.py flyte init.py utils csv_util.py workflows init.py ingest_flyte.py (the workflow I'm trying to run)
offending line
Copy code
from pdi_flyte.flyte.utils.csv_util import convert_csv_to_dataframe, write_chunked_parquet
fyi when workflow run from command line it works
Copy code
pyflyte run flyte/workflows/ingest_flyte.py
b

Blina Keraj

07/03/2023, 1:54 PM
I am having the same issue. Is this already addressed?
r

Rezwan Abir

07/03/2023, 1:55 PM
i fixed by changing import to flyte.utils....
4 Views