python - 提高 SpreadsheetNotFound gspread.exceptions.SpreadsheetNotFound
问题描述
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()
上面的代码不起作用,错误如下raise SpreadsheetNotFound gspread.exceptions.SpreadsheetNotFound,我该怎么办?
解决方案
推荐阅读
- c - 使用 FFI 和 C 函数在 ruby 中创建动态数组类
- javascript - 有没有办法在 where: $or 子句中包含一个数组和 sequelize?
- java - Android Studio中基于Button发送数据
- database - 如何在数据库laravel中存储不同用户角色的用户元信息
- angular - 带有函数调用的Angular 7动态列
- apache-spark - 使用简单查询时,如何在 Hive-Spark 中修复“org.apache.hadoop.hive.ql.metadata.HiveException”?
- python - 使用 Pandas pivot_table 嵌套小计“所有”行
- python - 二叉树的高度 - 迭代
- c - 使用 bazel 制作共享对象时不能使用全局
- java - 如何使环境变量在 JAR 文件中工作?