AttributeError:'模块'对象没有属性' login'

时间:2016-07-23 09:01:43

标签: python gspread

import gspread  
gc = gspread.login(‘the.email.address@gmail.com’,’password’)  

AttributeError:' module'对象没有属性' login'

1 个答案:

答案 0 :(得分:1)

我所知道的gsspread没有login方法!

我猜你要找的是authorize

理想情况下你应该这样做:

import gspread
gc = gspread.authorize(credentials) # check link below on how to obtain the credentials

gsspread在此处详细记录了如何获取credentials的程序 - http://gspread.readthedocs.io/en/latest/oauth2.html