Я пишу программу для друга, чтобы помочь с написанием карточек для заметок, и она работала нормально, пока я не обнаружил странную ошибку:
gspread.exceptions.APIError: {
"error": {
"code": 429,
"message": "Quota exceeded for quota group 'ReadGroup' and limit 'USER-100s' of service 'sheets.googleapis.com' for consumer 'project_number:74842143740'.",
"status": "RESOURCE_EXHAUSTED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developer console API key",
"url": "https://console.developers.google.com/project/PROJECT#/apiui/credential"
}
]
}
]
}
}
Я был очень смущен, так как это не было проблемой, и я не мог понять, почему это должно быть
мой код:
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = ["https://spreadsheets.google.com/feeds","https://www.googleapis.com/auth/drive"]
creds = ServiceAccountCredentials.from_json_keyfile_name('client_secret.json', scope)
client = gspread.authorize(creds)
sheet = client.open('Note Card BS').sheet1
for i in range(2, 22):
while sheet.cell(2, i).value=="":
source = input("What is source "+str(i-1)+"?: ")
sheet.update_cell(2, i, source)
for j in range(3, 18):
while sheet.cell(j, i).value=="":
fact = input("Fact "+str(j-2)+" from source no."+str(i-1)+": ")
sheet.update_cell(j, i, fact)
if sheet.cell(2, i+1).value =="":
while True:
add = input("Would you like to add another fact from source "+str(i-1)+"?(y/n): ")
if add=="y":
factNo = len(sheet.col_values(i))
fact = input("Fact "+str(factNo-3)+" from source no."+str(i-1)+": ")
sheet.update_cell(factNo+1, i, fact)
sheet.update_cell(factNo, 1, factNo-3)
else:
break
Мне не кажется, что это нужно так часто называть, поэтому я не знаю, что происходит. Мой друг работал над своими вещами, и внезапно все стало красным (я положил его на repl.it), и он подумал, что что-то сломал. ему это нужно скоро, поэтому любая помощь будет очень признательна.