Skip to content
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

Typo in manager.TransferManager.shutdown(). #312

Open
rickarmstrong opened this issue Jul 23, 2024 · 0 comments
Open

Typo in manager.TransferManager.shutdown(). #312

rickarmstrong opened this issue Jul 23, 2024 · 0 comments

Comments

@rickarmstrong
Copy link

There's what appears to be a typo in manager.TransferManager.shutdown():

self._shutdown(cancel, cancel, cancel_msg)

I think the intent was self._shutdown(cancel, cancel_msg).
Calling shutdown(cancel=True) raises TypeError. The less-than-ideal workaround is to call TransferManager._shutdown() directly.

The trace:

Traceback (most recent call last):
(irrelevant stuff removed)
  File "/home/cedar/venv/cedar/lib/python3.12/site-packages/s3transfer/manager.py", line 626, in shutdown
    self._shutdown(cancel, cancel, cancel_msg)
  File "/home/cedar/venv/cedar/lib/python3.12/site-packages/s3transfer/manager.py", line 632, in _shutdown
    self._coordinator_controller.cancel(cancel_msg, exc_type)
  File "/home/cedar/venv/cedar/lib/python3.12/site-packages/s3transfer/manager.py", line 707, in cancel
    transfer_coordinator.cancel(msg, exc_type)
  File "/home/cedar/venv/cedar/lib/python3.12/site-packages/s3transfer/futures.py", line 279, in cancel
    self._exception = exc_type(msg)
                      ^^^^^^^^^^^^^
TypeError: 'str' object is not callable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant