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

Fix Argument order in TransferManager shutdown method #331

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nl-sm
Copy link

@nl-sm nl-sm commented Jan 24, 2025

Calling shutdown from a TransferManager object throws an error further down the line, since the argument order passed to _shutdown is incorrect. Calling the function results in an exception being thrown like below

 File "/repos/test/app/clients/aws/s3.py", line 42, in shutdown_transfer 
   self.transfer_manager.shutdown(cancel=True)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/repos/test/.venv/lib/python3.13/site-packages/s3transfer/manager.py", line 626, in shutdown
    self._shutdown(cancel, cancel, cancel_msg)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/repos/test/.venv/lib/python3.13/site-packages/s3transfer/manager.py", line 632, in _shutdown
    self._coordinator_controller.cancel(cancel_msg, exc_type)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/repos/test/.venv/lib/python3.13/site-packages/s3transfer/manager.py", line 707, in cancel
    transfer_coordinator.cancel(msg, exc_type)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/repos/test/.venv/lib/python3.13/site-packages/s3transfer/futures.py", line 277, 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

Successfully merging this pull request may close these issues.

1 participant