https://prefect.io logo
Title
s

Scarlett King

09/27/2021, 3:34 PM
Hi, I’m having my project structured as below: Project_name — flows / flow.py — tasks — task1.py — task2.py So flow.py import tasks from task1.py and task2,py like so
from project_name.tasks import …
I’m trying to deploy this by running
prefect register
—project project_name -m “project_name.flows” But I’m getting error No module named ‘project_name’. What is the best way to do this? I’m trying to deploy the flow on Azure store
But I’m getting error No module named ‘project_name’
k

Kevin Kho

09/27/2021, 3:35 PM
What Storage are you using?
s

Scarlett King

09/27/2021, 3:36 PM
I’m using Azure storage
I’m trying to run ‘prefect register …’ locally on my laptop terminal as well
k

Kevin Kho

09/27/2021, 3:37 PM
Ah what agent/run config are you using?
z

Zanie

09/27/2021, 3:38 PM
It looks like your project is not available on your Python path. Is there a reason you're trying to use
-m
instead of
-p
?
s

Scarlett King

09/27/2021, 3:38 PM
I’m using KubernetesRun for run_configs and local agent
I tried to run with -p as well
But got the same error
d

davzucky

09/27/2021, 9:07 PM
You are missing the
___init___ py
in all your folders. Without that python doesn't consider them as module
:upvote: 1
s

Scarlett King

09/28/2021, 4:45 AM
Sorry, I forgot to mention that I do have the init files in all folders. This problem only occurs when I try to register flows using the cli. If I do flow.register(), it’s registered and works fine locally