https://prefect.io logo
Title
a

ashish karan

12/01/2022, 1:25 PM
Hi #prefect-aws I am trying to execute my flow which is uploaded to s3 storage from a remote agent in a laptop in some other location. Getting this error. Any help would be great. Thanks
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\engine.py", line 255, in retrieve_flow_then_begin_flow_run
    flow = await load_flow_from_flow_run(flow_run, client=client)
  File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\client\utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\deployments.py", line 157, in load_flow_from_flow_run
    storage_block = Block._from_block_document(storage_document)
  File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\blocks\core.py", line 540, in _from_block_document
    else cls.get_block_class_from_schema(block_document.block_schema)
  File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\blocks\core.py", line 571, in get_block_class_from_schema
    return lookup_type(cls, block_schema_to_key(schema))
  File "C:\Users\91878\miniconda3\envs\scrapy\lib\site-packages\prefect\utilities\dispatch.py", line 186, in lookup_type
    raise KeyError(
KeyError: "No class found for dispatch key 's3-bucket' in registry for type 'Block'."
1
a

Anna Geller

12/01/2022, 1:28 PM
Can you share the code that led to this error?
r

Ryan Peden

12/01/2022, 1:32 PM
If you are using
s3-bucket
from
prefect-aws
instead of the regular
s3
block that is built into Prefect, you will need to install the
prefect-aws
package on your agent machine, otherwise you will get the error you see here.
2
a

ashish karan

12/01/2022, 2:35 PM
^It works now. Thanks Ryan :)
👍 1
r

Ryan Peden

12/01/2022, 2:36 PM
You're welcome! I'm happy to hear it is working now 😄
🙌 2