поднять SpreadsheetNotFound gspread.exceptions.SpreadsheetNotFound - PullRequest
0 голосов
/ 08 мая 2020
import gspread
from oauth2client.service_account import ServiceAccountCredentials

scope = ["https://spreadsheets.google.com/feeds",'https://www.googleapis.com/auth/spreadsheets',"https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive"]

creds = ServiceAccountCredentials.from_json_keyfile_name("Ahmed-2581d46b4a9f.json", scope)
client = gspread.authorize(creds)
sheet = client.open('ahmed').sheet1 
data = sheet.get_all_records()

Приведенный выше код не работает, ошибка заключается в следующем. Поднимите SpreadsheetNotFound gspread.exceptions.SpreadsheetNotFound, что мне делать?

...