xyou365 / AutoRclone

AutoRclone: rclone copy/move/sync (automatically) with thousands of service accounts
https://www.gfan.loan/?p=235
1.36k stars 517 forks source link

Exceeded the maximum calls(1000) in a single batch request. #51

Open RockerFlower opened 4 years ago

RockerFlower commented 4 years ago
sudo python3 add_to_google_group.py -g sa@xx.xxx
<googleapiclient.discovery.Resource object at 0x7fc9ef262208>
Readying accounts |##########################      | 1000/1200Traceback (most recent call last):
  File "add_to_google_group.py", line 68, in <module>
    batch.add(group.members().insert(groupKey=gaddr, body=body))
  File "/usr/local/lib/python3.6/dist-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/googleapiclient/http.py", line 1400, in add
    % MAX_BATCH_LIMIT
googleapiclient.errors.BatchError: <BatchError "Exceeded the maximum calls(1000) in a single batch request.">
longveiw commented 3 years ago

I struggled with this for a while.

I solved this by editing http.py and changing MAX_BATCH_LIMIT = 1000 to MAX_BATCH_LIMIT = 1200