mbrenig / SheetSync

A python library to create, update and delete rows of data in a google spreadsheet.
http://sheetsync.readthedocs.org
MIT License
48 stars 18 forks source link

Library has missing scopes when getting cell feed #22

Open Kevin8688 opened 3 years ago

Kevin8688 commented 3 years ago

Hi I am trying to run SheetSync to access the data in a google drive sheet file however the library seems to not be finding the following scope:

https://spreadsheets.google.com/feeds

I believe this is due to google API v4, would there be a fix for this?

Thank you!

Error message given: INFO:sheetsync:Creating drive service DEBUG:sheetsync:Finding document by key. INFO:sheetsync:getting cell feed ERROR:sheetsync:gspread error. Not all requested scopes were granted by the authorization server, missing scopes https://spreadsheets.google.com/feeds. Traceback (most recent call last): File "/media/sf_Google_Drive/Code/sheetsync.py", line 683, in _cell_feed feed = self.gspread_client.get_cells_feed(self.worksheet, params=params) File "/media/sf_Google_Drive/Code/sheetsync.py", line 452, in gspread_client self._gspread_client.login() File "/home/osboxes/.local/lib/python3.8/site-packages/gspread/client.py", line 48, in login self.auth.refresh(Request(self.session)) File "/home/osboxes/.local/lib/python3.8/site-packages/google/oauth2/credentials.py", line 312, in refresh raise exceptions.RefreshError( google.auth.exceptions.RefreshError: Not all requested scopes were granted by the authorization server, missing scopes https://spreadsheets.google.com/feeds. Traceback (most recent call last): File "/media/sf_Google_Drive/Code/Auto_Gdrive.py", line 251, in print(get_queue()) File "/media/sf_Google_Drive/Code/Auto_Gdrive.py", line 37, in get_queue target = Sheet(credentials=creds, document_key='1Ip2twd7SM9WUH7EiupN_0f5Uyg7xG9GypYenayXa4Oo', File "/media/sf_Google_Drive/Code/sheetsync.py", line 416, in init self._get_or_create_headers() File "/media/sf_Google_Drive/Code/sheetsync.py", line 708, in _get_or_create_headers for cell in self._cell_feed(row=self.header_row_ix): File "/media/sf_Google_Drive/Code/sheetsync.py", line 689, in _cell_feed raise e File "/media/sf_Google_Drive/Code/sheetsync.py", line 683, in _cell_feed feed = self.gspread_client.get_cells_feed(self.worksheet, params=params) File "/media/sf_Google_Drive/Code/sheetsync.py", line 452, in gspread_client self._gspread_client.login() File "/home/osboxes/.local/lib/python3.8/site-packages/gspread/client.py", line 48, in login self.auth.refresh(Request(self.session)) File "/home/osboxes/.local/lib/python3.8/site-packages/google/oauth2/credentials.py", line 312, in refresh raise exceptions.RefreshError( google.auth.exceptions.RefreshError: Not all requested scopes were granted by the authorization server, missing scopes https://spreadsheets.google.com/feeds.