https://prefect.io logo
#prefect-community
Title
# prefect-community
h

Hassan Javeed

09/23/2020, 11:54 AM
I'm seeing this when I run a flow on prefect cloud, we've seen this before as well and sometimes it just goes away on its own. Does anyone have any idea ?
Copy code
Unexpected error raised during flow run: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/flow_runner.py", line 239, in run
    parameters=parameters,
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/cloud/flow_runner.py", line 184, in initialize_run
    task = tasks[task_run.task_slug]
KeyError: '7d9e37de-16ab-4664-a688-421da03bf1b2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/runner.py", line 162, in handle_state_change
    new_state = self.call_runner_target_handlers(old_state, new_state)
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/cloud/flow_runner.py", line 126, in call_runner_target_handlers
    prefect.context.update(flow_run_version=version + 1)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/prefect/environments/execution/k8s/job.py", line 179, in run_flow
    runner_cls(flow=flow).run(executor=executor_cls)
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/flow_runner.py", line 273, in run
    state = self.handle_state_change(state or Pending(), new_state)
  File "/usr/local/lib/python3.7/site-packages/prefect/engine/runner.py", line 184, in handle_state_change
    raise ENDRUN(Failed(msg, result=exc))
prefect.engine.signals.ENDRUN
j

josh

09/23/2020, 1:21 PM
Hi @Hassan Javeed what version of Prefect are you running? The code it shows at line 126 in the cloud flow runner is not the same as what it is currently which leads me to believe you are running on an old version and encountering some version locking mismatch
b

Brian Mesick

09/23/2020, 4:05 PM
Hey @josh I believe we’re running 0.12.6