DriveApp がリリースされる約 1 週間前から、このエラーに悩まされていました。エラーで断続的に失敗するコードのセクションがあります。
サービスが短時間に何度も呼び出されました: driveWriteVolume rateMax。呼び出しの間に Utilities.sleep(1000) を試してください。
問題のコードは次のとおりです。
for(var a = 0; a<attachments.length; a++){
if(a > 0){
child = "." + (a + 1) + " ";
}
else{
child = ".1 ";
}
var parent = (m + 1);
Utilities.sleep(5000);
var file = attachmentFolder.createFile(attachments[a]);//This is the line that causes the error.
Utilities.sleep(1000);
file.rename(parent + child + attachments[a].getName());
}
私は 1000 ミリ秒から始めて、徐々に 5000 ミリ秒まで上げましたが、それでも 200 ミリ秒ごとにエラーがスローされます。これはDocsListを使用しています。