Closed farabolaza closed 1 year ago
Looks like the worksheet id is being sent wrong. as a workaround you can unlink the cell and call cell.update(wks.id) Will push a fix.
Love this package and really wanted this feature, so found the bugs
return self._execute_request(self.service.files().get(fileId=fid)) #FIXME broken fileId
old_folder = self.drive.spreadsheet_metadata(fid=result['spreadsheetId']).get('parents', [None])[0]
I think this PR fixes it https://github.com/nithinmurali/pygsheets/pull/549
Ah gotcha, thanks for the great work btw.
Closing as this is fixed. Please repone if not.
Hi, I encounter the same issue and I am using 2.0.6, but it would work when I use 2.0.5
my code:
import pygsheets
gc = pygsheets.authorize(service_account_file='auth.json')
gc.create(title="test", folder="<folder_id>")
error:
File "/usr/local/lib/python3.10/site-packages/pygsheets/client.py", line 124, in create
old_folder=self.drive.spreadsheet_metadata(fid=result['spreadsheetId'])[0].get('parents', [None])[0],
KeyError: 0
my environment: macOS Ventura 13.1 python 3.10.9
This is fixed in the staging version, please use it until the next release. https://github.com/nithinmurali/pygsheets#from-github-recommended
Error when creating a spreadsheet in folder (either by id or name) Have used this feature in the past, but now I can't get it to work. If I omit folder destination info everything work as expected. May be some change made by google in their dirve API that's causing this not to work.
To Reproduce Steps to reproduce the behavior:
System Information