<@ULVA73B9P> I am suddenly getting this issue: ```...
# ask-marvin
i
@Marvin I am suddenly getting this issue:
Copy code
ValueError: Unable to find block document named "" for block type baseblock
What am I doing wrong?
m
The error you're encountering,
ValueError: Unable to find block document named "" for block type baseblock
, suggests an issue with how block names are being handled, either due to missing or improperly defined blocks. This can occur in both Prefect 2.x and 3.x versions due to incorrect block definitions or configurations. Here's a brief explanation based on both versions: ### Prefect Blocks Overview In Prefect, blocks are reusable units of code that can manage connections, configurations, or credentials and they are commonly stored in the Prefect backend. When you're trying to load a block that doesn't exist or hasn't been correctly saved, you might encounter such a ValueError. ### Possible Causes 1. Incorrect Block Name: You might be trying to load a block using an incorrect or empty name. Ensure that the block you're trying to refer to is correctly saved with a proper name. 2. Block Doesn't Exist: If you haven't saved the block previously, it won't exist in the Prefect storage, thus causing this error. ### Solutions 1. Check Block Name: Verify the block name you are using in your code. Ensure it matches exactly with what you have saved. - Example for loading:
my_block = Block.load("block_name")
2. Save Block Properly: If you haven't already saved the block, you need to create and save it first. - Example for saving:
Copy code
python
     from prefect.blocks.core import Block

     class MyBlock(Block):
         my_field: str

     my_block = MyBlock(my_field="data")
     my_block.save("my-block-name")
You can refer to the documentation for more information: - Prefect 2.x Blocks: Prefect 2.x Blocks Documentation - Prefect 3.x Blocks: Prefect 3.x Blocks Documentation Let me know if you need further assistance!
n
I am suddenly getting this issue:
can you show the whole traceback and ideally what version you're using?
i
Prefect version: 2.20.9 I basically recreated my workspace and since then I cannot run flows - if I skip the baseblock initialization, I can run the flow locally but I do not see the flow running in the UI but I cannot pinpoint the issue
Ok, facepalm I didn't login again to prefect, forgot the last step