https://prefect.io logo
#prefect-community
Title
# prefect-community
b

bral

08/08/2020, 9:21 AM
I have a same issue as @Riley Hun , but with local agent. The Flow has dependency from my classes, and after successfully registering and running - i got error " not module named". And it solved If i placed directory with dependency in my environment (C:\ProgramData\Anaconda3\...) For example in airflow there is plugin directory for this case. Does prefect has same option ?
c

Chris White

08/08/2020, 5:24 PM
Hi bral- with the local agent you can add import paths to your runs with the -p option. See the example here: https://docs.prefect.io/api/latest/agent/local.html#localagent
b

bral

08/09/2020, 8:35 PM
@Chris White thanks for quick response! But it does not help me. Probably i done some wrong. I have directory D:\pycharmproject\ it is root of project. In root project theres directory utils where placed utils.py. in my flow i imported : from utils.utils import Test , and started flow agent : prefect agent start local --import-path D:\pycharmproject\ . After registering flow and running i got same error. What i done wrong?
c

Chris White

08/09/2020, 8:39 PM
Hmm that sounds suspicious then; can you try adding another import path for
D:\pycharmproject\utils\
? (Note: you can append multiple paths by repeatedly using the
-p
or
--import-path
flag). IF that doesn’t work would you mind opening an issue for us with a minimal reproducible example?
I see the issue you opened - thank you! We’ll look into this week and let you know what we learn
b

bral

08/09/2020, 9:30 PM
@Chris White thank you so much!
👍 1