transferwee icon indicating copy to clipboard operation
transferwee copied to clipboard

Too many blocks too quickly (too many files)

Open antoinedelplace opened this issue 1 year ago • 2 comments

It seems there is a problem if too many files are sent at the same time. Maybe a well positioned time.sleep could solve this problem.

Checking for no duplicate filenames
Preparing to upload
Could not find any csrf-token
From storm_upload_token WETRANSFER_STORM_PREFLIGHT URL is: https://storm-us-east-1.wetransfer.net/api/v2/batch/preflight
From storm_upload_token WETRANSFER_STORM_BLOCK URL is: https://storm-us-east-1.wetransfer.net/api/v2/blocks
From storm_upload_token WETRANSFER_STORM_BLOCK URL is: https://storm-us-east-1.wetransfer.net/api/v2/batch
Get transfer id eac9fe195aa5***0231128094504
Doing preflight storm
Preparing storm block upload

Traceback (most recent call last):
  File "/upload_wetransfer.py", line 18, in upload_wetransfer
    url = upload(files)
          ^^^^^^^^^^^^^
  File "/transferwee/transferwee.py", line 588, in upload
    for f, b in zip(files, blocks["data"]["blocks"]):
                           ~~~~~~^^^^^^^^
KeyError: 'data'

The request is sending this response :

>>> print(blocks)
>>> {'ok': False, 'error': {'client_action_required': False, 'error_code': 'TOO_MANY_REQUESTS', 'message': 'You are creating too many blocks too quickly, please try again after waiting for a little bit.'}}

I am trying to send 636 files at the same time.

antoinedelplace avatar Nov 28 '23 09:11 antoinedelplace

Note : trying to zip all the files and sending a unique file triggers another error.

https://github.com/iamleot/transferwee/pull/72#issuecomment-1829521651

antoinedelplace avatar Nov 28 '23 10:11 antoinedelplace

Adapted to #72

sharevb avatar Nov 29 '23 21:11 sharevb