-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying WaiterError causes a TypeError #2617
Comments
Hi @iainelder, Thanks for the report. We'll take a look to see what the best solution is to make this exception copyable. |
This might overlap somewhat with boto/boto3#1221 |
Is there a reason why the below function can't be added to the WaiterError class?
becaue my code is now outputing the below text and I have no clue where it came from because it's an asynchronous error
|
One workaround is patching it
|
Describe the bug
WaiterError causes a TypeError when you try to copy it.
Steps to reproduce
Expected behavior
That a copy of the WaiterError instance is created.
Additional context
This bug makes it more difficult to work with the botocove library to query multiple AWS accounts in the organization. Botocove copies the output, including the exceptions, before returning the final result to the client. See botocove issue #26.
The ClientError class is copyable because it implements the
__reduce__
method.botocore/botocore/exceptions.py
Lines 482 to 486 in a692f50
To be copyable the WaiterError class needs also to implement the
__reduce__
method to match its__init__
method.botocore/botocore/exceptions.py
Lines 414 to 420 in a692f50
The text was updated successfully, but these errors were encountered: