Assaf Ben Shimon
05/09/2022, 11:29 AMprefect.exceptions.AuthorizationError: Malformed response received from Cloud - please ensure that you are authenticated. See `prefect auth login --help`.
However when I run prefect auth status
it says I'm connected and authenticated.
Any idea what's wrong?Anna Geller
Anna Geller
Assaf Ben Shimon
05/09/2022, 11:49 AMAnna Geller
prefect diagnostics
in both your flow registration environment and your agent?
2. What agent do you use?
3. How did you start your agent? Does your agent has the backend
switched to cloud
?
4. Can you share part of your failing flow code that shows the storage and run config?
In the worst case, you could recreate the API key and try logging out and in again with the new key on both your agent and your registration environment, since the API key may have expiredAnna Geller
Assaf Ben Shimon
05/09/2022, 11:56 AMAnna Geller
Assaf Ben Shimon
05/09/2022, 12:04 PMpy3_image
rule that I run
(bazel run image_name
)Assaf Ben Shimon
05/09/2022, 12:04 PMAnna Geller
Assaf Ben Shimon
05/09/2022, 12:11 PM{
"config_overrides": {
"cloud": {
"api_key": true
}
},
"env_vars": [],
"system_information": {
"platform": "Linux-5.13.0-1022-aws-x86_64-with-glibc2.29",
"prefect_backend": "cloud",
"prefect_version": "1.1.0",
"python_version": "3.8.10"
}
}
Assaf Ben Shimon
05/09/2022, 12:12 PMAssaf Ben Shimon
05/09/2022, 12:12 PMprefect agent local start
after adding the API key to the config fileAssaf Ben Shimon
05/09/2022, 12:14 PMfor path in paths:
my_flow.register("my-project-name")
my_flow.run(path = path, version = version)
Anna Geller
Assaf Ben Shimon
05/09/2022, 12:23 PMregister
and then run
Anna Geller
parameters
dict
def run(
self,
parameters: Dict[str, Any] = None,
run_on_schedule: bool = None,
runner_cls: type = None,
**kwargs: Any,
) -> Union["prefect.engine.state.State", None]:
also note that flow.run() will just run your flows locally, it doesn't run on the cloud backend so Auth to Cloud wouldn't matter in that caseAnna Geller
prefect register --project xyz -p flows/
will register all flows from the dir flows/Assaf Ben Shimon
05/10/2022, 7:36 AMAnna Geller