File not found: "client_secret.json"

72 views
Skip to first unread message

Morgan Allen

unread,
Dec 28, 2015, 12:46:53 PM12/28/15
to Google API Python Client
I'm following the Python quick start guide and am running into this issue.

What am I doing wrong? 

Dub-Pro:Desktop morganvallen$ python quick_start.py

 

Traceback (most recent call last):

 
File "quick_start.py", line 71, in <module>

    main
()

 
File "quick_start.py", line 55, in main

    credentials
= get_credentials()

 
File "quick_start.py", line 40, in get_credentials

    flow
= client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES)

 
File "/Library/Python/2.7/site-packages/oauth2client/util.py", line 140, in positional_wrapper

   
return wrapped(*args, **kwargs)

 
File "/Library/Python/2.7/site-packages/oauth2client/client.py", line 2217, in flow_from_clientsecrets

    cache
=cache)

 
File "/Library/Python/2.7/site-packages/oauth2client/clientsecrets.py", line 165, in loadfile

   
return _loadfile(filename)

 
File "/Library/Python/2.7/site-packages/oauth2client/clientsecrets.py", line 125, in _loadfile

   
raise InvalidClientSecretsError('File not found: "%s"' % filename)

oauth2client
.clientsecrets.InvalidClientSecretsError: File not found: "client_secret.json"


Nathaniel Manista

unread,
Jan 4, 2016, 12:20:33 PM1/4/16
to google-api-p...@googlegroups.com
On Sun, Dec 27, 2015 at 12:56 PM, Morgan Allen <morgan...@gmail.com> wrote:
I'm following the Python quick start guide and am running into this issue.

Which Python quick start guide? There are many; link us to the one you are following?
Do you see anything instructing you that you must have this file, or how to create it?
-N

Carlos Dominguez

unread,
Jan 6, 2016, 1:12:09 PM1/6/16
to Google API Python Client
Simple: when you downloaded the JSON file as per the quick start instructions, it downloads it as client_secretXXXXXXX.json, where XXXXXXXX is a string of numbers and letters. Just rename this file to client_secret.json, or rewrite the code so that it will look for the filename.
Reply all
Reply to author
Forward
0 new messages