alvin goh
12/01/2019, 9:14 AMfrom prefect import Flow, Parameter
with Flow("math") as f:
    x = Parameter("x")
    d = x['d']
    a = d + 1
flow_state = f.run(x={'d': 7})
print(flow_state) # success
# create new flow and copy old flow
new_flow = Flow(name = "Test")
new_flow.update(f)
flow_state2 = new_flow.run(x={'d': 7})
print(flow_state2) # failsERROR - prefect.TaskRunner | Unexpected error: TypeError("run() missing 1 required positional argument: 'key'",)
Traceback (most recent call last):
  File "/opt/conda/envs/pipeline/lib/python3.6/site-packages/prefect/engine/runner.py", line 48, in inner
    new_state = method(self, state, *args, **kwargs)
  File "/opt/conda/envs/pipeline/lib/python3.6/site-packages/prefect/engine/task_runner.py", line 869, in get_task_run_state
    self.task.run, timeout=self.task.timeout, **raw_inputs
  File "/opt/conda/envs/pipeline/lib/python3.6/site-packages/prefect/utilities/executors.py", line 85, in timeout_handler
    return fn(*args, **kwargs)
TypeError: run() missing 1 required positional argument: 'key'alvin goh
12/01/2019, 9:22 AMChris White
Chris White
alvin goh
12/02/2019, 12:01 AM