Hi all, is anyone facing the below problem when yo...
# prefect-cloud
m
Hi all, is anyone facing the below problem when you try to load the github storage in the flow after saving the block
Copy code
prefect.exceptions.ScriptError: Script at '/var/folders/rm/bm2spvzj6qq477q54wdvmqd40000gp/T/tmp0vkt8jv1/github-repository-majo-github-repo/datalake/cids/c008/flows/migration/test.py' encountered an exception: TypeError('Result storage configuration must be persisted server-side. Please call `.save()` on your block before passing it in.')
1
using prefect_github package since the github in the filesystem is removed
This is happening with s3 storage where i am using prefect_aws
v
https://prefect-community.slack.com/archives/C04DZJC94DC/p1725514264247849 Maybe it will help you. @Nate did you decide that the third version is so good that detailed documentation is unnecessary? ;)
m
@Vadym Shkarbul I have did the same and i have save the block with credential as well but still i am seeing the same error
v
Me too. I believe @Maciej Bukczynski could help us.
n
hi @Vadym Shkarbul - please feel free to open an issue / PR with information you think should be there
if you're seeing unexpected behavior, it is most helpful if you could please open an issue with an MRE so we can understand the behavior you're seeing
as the error message states, if you save the block before passing it in to
result_storage
, then this works
Copy code
from prefect_aws import S3Bucket

from prefect import flow

S3Bucket(bucket_name="mybucket").save("test", overwrite=True)


@flow(result_storage=S3Bucket.load("test"))
def main():
    return "test return"


if __name__ == "__main__":
    main()
🙏 1
reading the docs on results may be useful!
m
If it helps, the way I finally got it to work was to create the block and then just pass it in as a string like:
Copy code
@flow(result_storage="s3-bucket/s3-results-storage")
upvote 1
🙏 1
n
great to hear! thanks for following up
👍 1
m
Thanks for everyone on following up on the this issue now my able to deploy the deployment using the
result_storage="s3-bucket/s3-results-storage"
But the one thing we should get the storage as a load instead of provide the value directly so can we bring up with prefect team to fix this cleanly
🙌 1