Closed crluna closed 9 years ago
Sorry for the late reply. Is the problem still persists?
If so, can you post your gspread's version and the method of authorization you're using?
I get the same...thanks
I'm seeing this too. Here's my code snippet if it helps.
json_key = json.load(open(config.get('FORM_RESPONSES', 'oauthJSON')))
scope = ['http://spreadsheets.google.com/feeds']
credentials = SignedJwtAssertionCredentials(json_key['client_email'], json_key['private_key'], scope)
gc = gspread.authorize(credentials)
spreadsheetName = config.get('FORM_RESPONSES', 'spreadsheetName')
wks = gc.open(spreadsheetName)
worksheet = wks.get_worksheet(0)
cell_list = worksheet.range('A1:A10')
print(cell_list)
Figured out what the problem was. The scope url needs to have a secure http connection. So simple, yet so infuriating.
I am trying to just open a spreadsheet and read from it. Currently it seems that I can login and retrieve the spreadsheet successfully. However as soon as I try to read a sheet from it I get a 401 error. Here is the traceback:
Any ideas how I can go about this?
Thanks.