Gspread和Pygsheets需要很长时间进行身份验证

时间:2020-02-01 19:40:04

标签: python google-sheets gspread pygsheets

使用Python连接到Google表格。我昨天刚使用了gspread和pygsheets,没有任何问题,但是由于某种原因,今天相同的代码需要花费很长时间进行身份验证-大约需要十分钟,通常需要几秒钟的时间。有没有人曾经发生过这种事情,或者知道为什么会这样?

传播范围:

scope = ['https://www.googleapis.com/auth/drive','https://spreadsheets.google.com/feeds'] creds = ServiceAccountCredentials.from_json_keyfile_name('client_secret.json', scope) c = gspread.authorize(creds)

Pygsheets

gc = pygsheets.authorize(service_file='client_secret.json') spreadsheet2 = gc.open('UK Sentiment')

我尝试更新凭据并重新运行,但这无济于事。谢谢!

0 个答案:

没有答案