Alex Welch
02/26/2021, 7:30 PMKeyError
. The second is that it is showing me the correct key and yet stating that it was not found. I have the secrets defined in the Prefect UI
Failed to load and execute Flow's environment: KeyError('The secret <secret> was not found. Please ensure that it was set correctly in your tenant: <https://docs.prefect.io/orchestration/concepts/secrets.html>')
I followed the docs to establish the secret and am using the same variable name in both the UI and the code. GH_TOKEN
GH_TOKEN = Secret("GH_TOKEN").get()
STORAGE = GitHub(
repo="<my_repo_name",
path=f"flows/my_flow.py",
access_token_secret=GH_TOKEN
)
Zanie
raise KeyError(f"The secret {self.name} was not found. Please ensure that it ...")
Zanie
.get()
on your secret! You'll want to just pass the name of the secret access_token_secret="GH_TOKEN"
and let it be resolved at runtime.Zanie
Alex Welch
02/26/2021, 7:35 PMAlex Welch
02/26/2021, 7:35 PMAlex Welch
02/26/2021, 7:37 PM