I have the google api enabled and an oauth 2.0 id created on google console and i get prompted in a web browser to authorize access but then I get an FileNotFoundError error in Jupyter Labs
gc = pygsheets.authorize(outh_file='client_secret.json')
Authentication successful. Storing credentials to C:\Users\me\Documents\Folder\PythonProject\sheets.googleapis.com-python.json
The token file is created successfully but the NotFoundError is looking in a temp folder not the folder it saved the file
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\me\\AppData\\Local\\Temp\\02b35e51-6576-4739-9f1c-135348c707f0\\www.googleapis.com,drive,v3,files,corpora=user&pageSize=500&fields=files%28id%2C+name%29&q=mimeType%3D%27application%2Fvnd.google-apps.spreadsheet%27&supportsTeamDrives=false&includeTeamDriveItems=fal,6fa737f4e6c871f0b9ea9ea38467b8b6'
This is a known bug and is fixed in the trunk. So, either install pygsheets from staging branch
pip install https://github.com/nithinmurali/pygsheets/archive/staging.zip
or as a workaround disable cache
gc = pygsheets.authorize(outh_file='client_secret.json', no_cache=True)