On version 0.9.8 and received this error during te...
# ask-community
j
On version 0.9.8 and received this error during testing:
Copy code
Unexpected error: AttributeError("'S3ResultHandler' object has no attribute '_client'")
any thoughts?
j
What are you testing for this to occur? The
_client
attribute was updated in this recent PR https://github.com/PrefectHQ/prefect/pull/2136 and I wonder if there’s a chance it’s being referenced before assignment
j
Im running an end-to-end test of a workflow but further review of the code I realize that the handler is not referenced in any of the task
j
🤔 so the issue is happening without initializing the handler at all?
j
I do initialize the result handler but I dont place the object in the task definition
j
Are you initializing it similar to this?
Copy code
In [21]: S3ResultHandler(bucket='my-bucket')
Out[21]: <ResultHandler: S3ResultHandler>

In [22]: r = _

In [23]: r.client
Out[23]: <botocore.client.S3 at 0x10cc10908>

In [24]: r._client
Out[24]: <botocore.client.S3 at 0x10cc10908>
j
Copy code
RESULT_HANDLER = S3ResultHandler(
    bucket='workflow-output',
    aws_credentials_secret='AWS_CREDS',
)
but then the object is not used anywhere in the workflow code
j
Does the error happen there when you initialize or when you run your flow?
j
run the flow
j
Weird I’m really not sure how that error would be raised if your flow does not use the S3ResultHandler anywhere
j
any suggestions for
0.9.8
? I have already moved back to
0.9.7
j
Oh so this works fine on
0.9.7
?
Do you happen to have a reproduceable example that encounters this?
j
Hey josh, I now see what is going on with this result_handler
I have two workflows: one with retries and the other without. The workflow with retries requires a result_handler at the Flow level. Now on version
0.9.8
and
0.9.7
I am getting the
Unexpected error: AttributeError("'S3ResultHandler' object has no attribute '_client'")
error
also seems to occur the first time for a mapping task
j
Hi @John Ramirez . I met the same error on 0.9.8 and wondering if you have figured it out. Our S3ResultHandler is also set on the flow level.