【发布时间】:2022-01-21 22:11:09
【问题描述】:
def printit():
threading.Timer(10.0, printit).start()
newIDS = wks.acell('A2').value
inProgIDS = wks.acell('B2').value
completedIDS = wks.acell('C2').value
ticketData = {
"newIDS" : newIDS,
"inProgIDS" : inProgIDS,
"completedIDS" : completedIDS,
}
with open('ids.json', 'w') as url_file:
json.dump(ticketData, url_file)
printit()
我每 10 秒使用 GSpread 对 Google Api 执行一次 ping 操作,以从 3 个单元格中获取一些值。它说我超出了我的配额,但是当我进入配额页面时,它显示使用率为 17%。
gspread.exceptions.APIError: {'code': 429, 'message': "配额指标 'Read requests' 超出配额并限制服务 'sheets.googleapis.com' 的'Read requests per minute per user' for消费者 'project_number:206671335281'.", 'status': 'RESOURCE_EXHAUSTED', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'RATE_LIMIT_EXCEEDED', '域':'googleapis.com','元数据':{'quota_limit':'ReadRequestsPerMinutePerUser','quota_metric':'sheets.googleapis.com/read_requests','服务':'sheets.googleapis.com','消费者': 'projects/20}}]}
【问题讨论】: