【问题标题】:Exception: Service invoked too many times for one day: urlfetch but I'm under limit例外:一天内调用了太多次服务:urlfetch 但我在限制之下
【发布时间】:2020-12-20 00:58:46
【问题描述】:

您好,我在链接的 Google 表格 Google Apps 脚本中有此功能。它在工作表中的 30,000 行中被调用。我有一个付费的 G Suite Basic 帐户。根据 Google 文档,我应该能够进行 100,000 次 URLFetch 调用 https://developers.google.com/apps-script/guides/services/quotas

功能是

function GetLatNLon(Input) {
  var api = "myapikey";
  var base = "https://maps.googleapis.com/maps/api/geocode/json?address=";
  var url = base + Input + "&key=" + api;
  var response = UrlFetchApp.fetch(url);
  var data = JSON.parse(response);
  var Lat = data.results[0].geometry.location.lat;
  var Lon = data.results[0].geometry.location.lng;
  var LatNlon = Lat + ", "+ Lon;
  return LatNlon;
}

【问题讨论】:

    标签: google-apps-script google-workspace quota


    【解决方案1】:

    假设这个函数实际上每行调用一次,如你所说,我确实注意到配额表下面的这个注释:

    Note: Newly created G Suite domains are subject to the consumer limit for the first billing cycle if they have six or more users, or several billing cycles if they have fewer users. For more information, see the Help Center page on sending limits.

    所以也许是这样。

    【讨论】:

    • 啊!丹·奥斯瓦尔特。你会因阅读理解而获得额外的学分。我没看到。哈哈。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多