使用python 3无法阅读带有gspread的表格

时间:2017-11-11 08:23:14

标签: python-3.x google-sheets-api gspread

import gspread
from oauth2client.service_account import ServiceAccountCredentials

scope = ['https://www.googleapis.com/auth/spreadsheets.readonly']
creds = 
ServiceAccountCredentials.from_json_keyfile_name('creds.json',scope)
client = gspread.authorize(creds)

print(client)

我能够创建一个客户端对象但是当我尝试读取任何工作表时,我得到了这个无用的错误

  

gspread.exceptions.RequestError:(401,' 401:b \' \ n \ n提示无效 - AuthSub令牌的范围错误\ n \ n \ n

令牌无效 - AuthSub令牌的范围错误

\ n

错误401

\ n \ n \ n \'')

0 个答案:

没有答案