https://prefect.io logo
m

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
infrastructure:
  type: process
  env: {}
  labels: {}
  name: null
  command:
  - 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/_utilities.py", line 41, in wrapper
    return fn(*args, **kwargs)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
    return call()
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 383, in __call__
    return self.result()
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 283, in result
    return self.future.result(timeout=timeout)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 169, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 346, in _run_async
    result = await coro
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/cli/deployment.py", line 283, in inspect
    deployment_json["infrastructure"] = Block._from_block_document(
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/blocks/core.py", 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/core.py", 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/core.py", line 683, in get_block_class_from_key
    return lookup_type(cls, key)
  File "/root/.Envs/healthgraph/lib/python3.8/site-packages/prefect/utilities/dispatch.py", line 185, in lookup_type
    raise KeyError(
KeyError: "No class found for dispatch key 'process' in registry for type 'Block'."
An exception occurred.
3 Views