Google sheets API v4:HttpError 429.“资源已耗尽(例如,检查配额)。” [英] Google sheets API v4: HttpError 429. "Resource has been exhausted (e.g. check quota)."

查看:655
本文介绍了Google sheets API v4:HttpError 429.“资源已耗尽(例如,检查配额)。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用Python更新大约1000张。每个需要2-3分钟更新。这项工作在昨天的大部分时间里运行(〜8小时)。当我在 console.developers.google.com 中查看 Google Sheets API 的配额时,我已经使用过读组中有3k,写组有4k。几乎没有接近给出的40k配额。

现在所有1000张图纸都会与一张图纸进行交互,因为所有的图标都在该图纸上。实际上,我尝试使用两个不同的项目签名,一个通过我的公司域名,一个通过我的Gmail,两个都可以访问这些文件。当我用公司凭据运行它。它也给我一个 HttpError 429 ,并且已经用这个凭证发出了0个请求。

有一些我不知道的隐藏配额吗?像调用一个电子表格一样?这就是它的样子。谷歌,你是否把我关闭到电子表格,因为我昨天访问了它8小时?



它轰炸在 spreadsheets()。values() .update spreadsheets()。batchUpdate

解决方案

表格API的配额限制为每天 40,000个查询。您可以在使用率限制文档中看到:

这个Google Sheets API版本的默认限制为每天40,000个查询。


要查看或更改项目的使用限制,或要求您的配额增加
,请执行以下操作:

如果您的项目还没有结算帐户,则
创建一个。访问API
控制台中API库的已启用API页面,然后从列表中选择一个API。要查看和更改
与配额有关的设置,请选择配额。要查看使用情况统计信息,请使用
选择使用情况。



I have been updating about 1000 sheets using Python. Each takes about 2-3 minutes to update. The job ran most of the day yesterday (~8hrs). And when I look at my quotas for Google Sheets API in console.developers.google.com, I have used about 3k in the read group and 4k in the write group. Not nearly close to the 40k quota that is given.

Now all of the 1000 sheets interact with one sheet because all of the keys are on that one sheet.

In fact, I have tried using 2 different project sign ins, one through my company domain and one through my gmail, that both have access to these files. When I run it with the company credentials. It also gives me a HttpError 429, and 0 requests have been made with that credential.

Is there some hidden quota I don't know about? Like calls to one spreadsheet? That's what it seems like. Google, are you cutting me off to the spreadsheet because I accessed it for 8hrs yesterday?

It is bombing on spreadsheets().values().update and spreadsheets().batchUpdate

解决方案

Sheets API has a quota limit of 40,000 queries per day. You can see that in Usage Limits docs:

This version of thea Google Sheets API has a default limit of 40,000 queries per day.

To view or change usage limits for your project, or to request an increase to your quota, do the following:

If you don't already have a billing account for your project, then create one. Visit the Enabled APIs page of the API library in the API Console, and select an API from the list. To view and change quota-related settings, select Quotas. To view usage statistics, select Usage.

这篇关于Google sheets API v4:HttpError 429.“资源已耗尽(例如,检查配额)。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆