https://prefect.io logo
Title
s

Stephen Lloyd

04/14/2022, 7:48 AM
I’m getting this error when using the FivetranSyncTask
Traceback (most recent call last):
  File "/Users/slloyd/projects/dwbi-orchestration/.venv/lib/python3.8/site-packages/prefect/engine/task_runner.py", line 880, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/Users/slloyd/projects/dwbi-orchestration/.venv/lib/python3.8/site-packages/prefect/utilities/executors.py", line 468, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "workable/src/flow.py", line 64, in fivetran_sync
    status = FivetranSyncTask.run(
TypeError: method() missing 1 required positional argument: 'self'
creds is passed in from a PrefectSecret task.
@task
def fivetran_sync(connector: str, creds: dict) -> dict:
    status = FivetranSyncTask.run(
        api_key=creds['api_key'],
        api_secret=creds['api_secret'],
        connector_id=connector
        )
    return status
j

Jacob Blanco

04/14/2022, 7:51 AM
I think you need to run the constructor
FivetranSyncTask().run(...)
note the
()
:upvote: 2
s

Stephen Lloyd

04/14/2022, 8:17 AM
That was it. Thanks.
:party-parrot: 1