python - Access google docs using gspread -


i trying access google docs using gspread utility , successful when tried below code on google doc

import gspread         g = gspread.login('gmailid', 'password') worksheet = g.open('googlesheetname').get_worksheet(0)           val = worksheet.cell(2, 1).value        print val 

but when tried same code corporate account uses google server, getting below error:

  raise authenticationerror("unable authenticate. %s code" % ex.code) gspread.exceptions.authenticationerror: unable authenticate. 500 code 

can please me on this?

see author of gspread says here:

two factor authorization

in case google account protected 2 factor authorization, have create application-specific password , use email login usual.

otherwise authenticationerror: unable authenticate. 403 code when trying login.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -