문제

I have installed gspread and gdata in my virtual environment using pip. And when I try to login with email and password following the documentation, as shown:

import gspread
gc = gspread.login('533ghimiresantosh@gmail.com','password')

It throws this error: TypeError: login() takes no arguments (2 given)

gspread is installed properly which is confirmed by successful execution of line import gspread in the python console. Is there some dependency issue that I am unaware of or anything?

도움이 되었습니까?

해결책

You have to login like this

c = gspread.Client(auth=('user@example.com', 'qwertypassword'))
c.login()

source http://burnash.github.io/gspread/#gspread.Client.open

다른 팁

Using the latest version I can still do it: gc = gspread.login(USERNAME, PASSWORD)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top