gspread icon indicating copy to clipboard operation
gspread copied to clipboard

not able to open the google spreadsheet via gspread

Open ghost opened this issue 12 years ago • 2 comments

Hello guys,

I have used the gspread for writing the data on google spreadsheet. Its working fine locally but when I was trying at live server it gives me a following error .

File "/home/openerp10/openerp_7.0/addons/spreadsheet_calculate_all/spreadsheet_calculate_all.py", line 53, in insert a = c.open(title).sheet1 File "/usr/local/lib/python2.7/dist-packages/gspread-0.1.0-py2.7.egg/gspread/client.py", line 130, in open raise SpreadsheetNotFound SpreadsheetNotFound

The code is as follow, if title and username and passwd: try: c = gspread.Client(auth=(username,passwd)) c.login() a = c.open(title).sheet1 except Exception, e: raise osv.except_osv(_('User Error!'), _('Please give correct google username,password and document title.'))

Please help. Thank you!

ghost avatar Jan 24 '14 08:01 ghost

I am getting an error on this as well. Except my code is as follows:

import sys print sys.path sys.path.append('/home/ren/Desktop/gspreadtest/oauth2clientmaster/oauth2client') sys.path.append('/home/ren/Desktop/gspreadtest/gspreadmaster') print sys.path

import json import gspread from client import SignedJwtAssertionCredentials

json_key = json.load(open('gspreadt.......json')) scope = ['https://spreadsheets.google.com/feeds']

credentials = SignedJwtAssertionCredentials(json_key['client_email'], json_key['private_key'], scope) gc = gspread.authorize(credentials)

#finished all oauth stuff, now working on sheets.

ctacc = gc.open("ct").sheet1


Error Message:

Traceback (most recent call last): File "./gspreadtest.py", line 21, in ctacc = gc.open("ct").sheet1 File "/home/ren/Desktop/gspreadtest/gspreadmaster/gspread/client.py", line 150, in open raise SpreadsheetNotFound gspread.exceptions.SpreadsheetNotFound

RenSylvain avatar Apr 27 '15 23:04 RenSylvain

@RenSylvain try with the solution post on #224

elliotslab avatar Apr 28 '15 15:04 elliotslab