hey folks, below is the folder structure pdi/ ...
# ask-the-community
r
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
you need to add init.py to workflows/ and flyte/ folder
r
it's there already
you mean
__init__.py
also in Dockerfile I have
ENV _PYTHONPATH_ /root
k
how do you package it, pyflyte register or pyflyte package?
r
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
could you try
pyflyte --pkgs pdi_flyte.flyte.workflows …
r
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
I am having the same issue. Is this already addressed?
r
i fixed by changing import to flyte.utils....
164 Views