Malavika S Menon

07/04/2023, 5:10 AM
Copy code
KeyError: "No class found for dispatch key 'process' in registry for type 'Block'." prefect
Getting this error when a flow run is submitted to the agent. The error causes the agent process to terminate as well. This is the corresponding deployment-yaml file
Copy code
  type: process
  env: {}
  labels: {}
  name: null
  - python
  - -m
  - prefect.engine
  stream_output: true
  _block_type_slug: Process
Any help on this would be appreciated, this is the full traceback of the error. Also encounter this error when running prefect deployment inspect
Copy code
Traceback (most recent call last):
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/cli/", line 41, in wrapper
    return fn(*args, **kwargs)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/utilities/", line 255, in coroutine_wrapper
    return call()
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/", line 383, in __call__
    return self.result()
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/", line 283, in result
    return self.future.result(timeout=timeout)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/", line 169, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/", line 389, in __get_result
    raise self._exception
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/", line 346, in _run_async
    result = await coro
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/cli/", line 283, in inspect
    deployment_json["infrastructure"] = Block._from_block_document(
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/blocks/", line 618, in _from_block_document
    else cls.get_block_class_from_schema(block_document.block_schema)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/blocks/", line 672, in get_block_class_from_schema
    return cls.get_block_class_from_key(block_schema_to_key(schema))
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/blocks/", line 683, in get_block_class_from_key
    return lookup_type(cls, key)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/utilities/", line 185, in lookup_type
    raise KeyError(
KeyError: "No class found for dispatch key 'process' in registry for type 'Block'."
An exception occurred.