<@ULVA73B9P> I am on prefect 2.19.3 and I am tryin...
# ask-marvin
m
@Marvin I am on prefect 2.19.3 and I am trying persist my result to s3 such that I can retrieve gather the results from flows asynchronously as they are running in a k8 cluster. When I run my flow locally with result persistence, I have no issues and can even download, view and verify the data in s3. When I run within the cluster which has the correct permissions to s3, I repeatably get the following error:
Copy code
Crash detected! Execution was interrupted by an unexpected exception: TypeError: unhashable type: 'dict'
Where the return results is
['some-id-str']
m
The error you're encountering,
TypeError: unhashable type: 'dict'
, is related to an issue with the handling of AWS credentials when using Prefect's S3 integration. This is a known problem and has been discussed in various GitHub issues, such as this one. ### Key Points: 1. AWS Credentials Handling: The issue arises when AWS credentials are improperly stored or referenced, leading to an unhashable dictionary being used where a hashable type is expected. This often occurs when using Prefect's
S3Bucket
with
AwsCredentials
. 2. Potential Fixes: - Ensure that the credentials are correctly instantiated and saved. You might want to explicitly define the credentials in your code and avoid relying on defaults that might not be correctly set up. - Check that the credentials are correctly referenced in your S3 block and are not inadvertently being converted into a dictionary. 3. References: - GitHub Issue #14147: Discusses similar problems and potential workarounds. - AWS Client Parameters Issue: Details about how AWS client parameters can lead to similar errors. For your specific case, you should verify that the AWS credentials are correctly configured and not being altered into a dictionary form. You may need to adjust how you are setting or referencing these credentials in your Prefect setup on the Kubernetes cluster.