https://prefect.io logo
Title
j

Jack Chang

01/28/2022, 6:59 PM
Hey everyone! Ive set up an agent and my flow on prefect cloud. When I run my flow, I get:
[28 January 2022 10:46am]: Failed to load and execute Flow's environment: ModuleNotFoundError("No module named '/Users/jackchang/'")
I went through some threads and added a gitlab repo as the storage and added that to my flow. Any ideas on what I should try next? 🙂
k

Kevin Kho

01/28/2022, 7:11 PM
Adding a remote storage like Gitlab should work here. I think you did not re-register when you re-ran the Flow? Because it still seems to be pulling from the default local storage
👍 1
j

Jack Chang

01/28/2022, 7:52 PM
Now getting
Failed to load and execute Flow's environment: GitlabGetError('404 Project Not Found')
I've set up cloud secret with the gitlab and set a deploy key 😕
a

Anna Geller

01/28/2022, 8:06 PM
can you try setting this env variable and rerunning?
export PREFECT__CLOUD__USE_LOCAL_SECRETS=false
it could be your local Prefect version tries to get local Secrets
👍 1
by deploy key you mean
access_token_secret
?
By default, Prefect is looking for a secret named 
GITLAB_ACCESS_TOKEN
. If you want to use a different name for the Secret, you can configure that using the argument
access_token_secret
. Note: this is just a reference to the PrefectSecret (i.e. Secret’s name), rather than the Secret itself
j

Jack Chang

01/28/2022, 8:17 PM
I renamed my secret to
GITLAB_ACCESS_TOKEN
and exported the env variable - still getting the same error 😞
a

Anna Geller

01/28/2022, 8:18 PM
can you share your full storage config?
here are also docs for this storage https://docs.prefect.io/api/latest/storage.html#github
k

Kevin Kho

01/29/2022, 1:29 AM
You can add it to storage
flow..storage = SomeStorage(.., secrets=["GITLAB_ACCESS_TOKEN"]