0

I have succesfully installed pygsheets on windows 7, but on my Ubuntu 14.04 server I keep getting this error. The file is named to client_secret.json and placed in same dir with my py-files, so the path is relative and correct. Also tried full name to json file. Should I place the file somewhere else? My output error is this:

gc = pygsheets.authorize(outh_file='client_secret_some_numbers_and_signs', no_cache=True)
File "/usr/local/lib/python3.4/dist-packages/pygsheets/client.py", line 549, in authorize outh_nonlocal=outh_nonlocal)  
File "/usr/local/lib/python3.4/dist-packages/pygsheets/client.py", line 505, in get_outh_credentials raise IOError(2, "Client secret file does not exist.", client_secret_file)   
FileNotFoundError: [Errno 2] Client secret file does not exist.: 'client_secret_some_numbers_and_signs.json'    
Nithin
  • 5,470
  • 37
  • 44
CARTOS
  • 221
  • 2
  • 8
  • are you sure the filename is passed correctly? if so try running this from same dir and check whats the result `import os; print( os.path.isfile(''))` – Nithin Feb 15 '18 at 15:40
  • Thx for quick reply. Found the solution. – CARTOS Feb 15 '18 at 20:36

1 Answers1

0

Setting the absolute path to json file did the trick.

CARTOS
  • 221
  • 2
  • 8