Zach
11/17/2020, 7:47 PMgcs_creds_secret = PrefectSecret("GCS_SP_CREDS")
Jenny
11/17/2020, 8:07 PMZach
11/17/2020, 8:08 PMUnexpected error: AttributeError("'PrefectSecret' object has no attribute 'secret_name'")
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/prefect/engine/task_runner.py", line 856, in get_task_run_state
value = prefect.utilities.executors.run_task_with_timeout(
File "/usr/local/lib/python3.8/dist-packages/prefect/utilities/executors.py", line 298, in run_task_with_timeout
return task.run(*args, **kwargs) # type: ignore
File "/usr/local/lib/python3.8/dist-packages/prefect/tasks/secrets/base.py", line 65, in run
name = self.secret_name
AttributeError: 'PrefectSecret' object has no attribute 'secret_name'
__init__()
method,. Not sure why that is though. But it seems in the run method here, the code tries to access this class instance variable and it fails.josh
11/17/2020, 8:21 PMIn [1]: from prefect.tasks.secrets import PrefectSecret
In [2]: PrefectSecret("TEST")
Out[2]: <Task: TEST>
In [3]: PrefectSecret("TEST").run()
Out[3]: 'asdf\nhere'
Are you by any chance building your flow in a newer version of prefect and attempting to run it in an older one?