You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to import data from a spreadsheet where I had view only, no edit permissions.
I was able to get_doc successfully but when I try to get_worksheet I get the following error:
/myproject/lib/python2.7/site-packages/gspread/models.pyc in get_worksheet(self, index)
146 """
147 if not self._sheet_list:
--> 148 self._fetch_sheets()
149 try:
150 return self._sheet_list[index]
/myproject/lib/python2.7/site-packages/gspread/models.pyc in _fetch_sheets(self)
64 feed = self.client.get_worksheets_feed(self)
65 for elem in feed.findall(_ns('entry')):
---> 66 self._sheet_list.append(Worksheet(self, elem))
67
68 def add_worksheet(self, title, rows, cols):
/myproject/lib/python2.7/site-packages/gspread/models.pyc in __init__(self, spreadsheet, element)
168 self._element = element
169 self.version = self._get_link(
--> 170 'edit', element).get('href').split('/')[-1]
171
172 def __repr__(self):
/myproject/lib/python2.7/site-packages/gspread/models.pyc in _get_link(self, link_type, feed)
209 def _get_link(self, link_type, feed):
210 return finditem(lambda x: x.get('rel') == link_type,
--> 211 feed.findall(_ns('link')))
212
213 def _fetch_cells(self):
/myproject/lib/python2.7/site-packages/gspread/utils.pyc in finditem(func, seq)
16
17 """
---> 18 return next((item for item in seq if func(item)))
19
20
StopIteration:
If I save a copy of the spreadsheet and open the copy, where I am owner with edit permissions, then I can get_worksheet successfully. So I believe it is due to permissions.
I realise may not be possible due to Google API, but I'd hoped to still be able to do non-editing operations.
The text was updated successfully, but these errors were encountered:
I wanted to import data from a spreadsheet where I had view only, no edit permissions.
I was able to
get_doc
successfully but when I try toget_worksheet
I get the following error:If I save a copy of the spreadsheet and open the copy, where I am owner with edit permissions, then I can
get_worksheet
successfully. So I believe it is due to permissions.I realise may not be possible due to Google API, but I'd hoped to still be able to do non-editing operations.
The text was updated successfully, but these errors were encountered: