GAE python - client_secrets.json 'File not found' - app.yaml error?

267 views Asked by At

I am using GAE (python) to make a web application. I am specifically attempting to get a youtube API to work, but I cannot get the credentials to function properly.

If I follow the "Retrieve my Uploads" example here, I keep getting an error when importing the client_secrets.json file:

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

I have checked and rechecked my file name, reference spelling, etc. multiple times. I do not know what I am doing wrong.

I have a feeling this may be due to incorrect settings in my app.yaml file, but I cannot find an example on Google or elsewhere with this type of example application showing the correct configuration for the app.yaml file. It seems that all examples merely show a portion of the code, not a full application in context.

My file is currently:

application: [my app name]
version: 1
runtime: python27
api_version: 1
threadsafe: false

handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css))
  static_files: \1
  upload: (.*\.(gif|png|jpg|ico|js|css))

- url: .*
  script: testapp.py

libraries:
- name: webapp2
  version: latest
- name: jinja2
  version: latest

I have seen this question posted elsewhere on the internet, but with no posted answers! Any help would be greatly appreciated!

1

There are 1 answers

0
sean On BEST ANSWER

I was able to find an example online that I got to work, so I used those app.yaml settings in my project, which then worked. It would be nice for Google to post more complete examples, instead of clips from only the .py script.

application: [your app name]
version: 1
runtime: python27
api_version: 1
threadsafe: false

handlers:
- url: /static
  static_dir: static

- url: /.*
  script: testapp.app

libraries:
- name: webapp2
  version: latest
- name: jinja2
  version: latest