App.yaml file - Unable to assign value 'python27 api_version' to attribute 'runtime':
I am trying to deploy a very simple web page using google app engine but cannot deploy the app due to some error with my yaml file.
Mistake:
(gcloud.app.deploy) An error occurred while parsing the file: [/home/google_gcp/parkwaypoc/app.yaml] Unable to assign value 'python27 api_version' to attribute 'runtime': The value of 'python27 api_version' for runtime does not match expression ' ^ (: ((Gs: // [a-z0-9 -._ /] +) | ([AZ] [a-z0-9-] {0,29}))) $ 'p>
My App.yaml file:
runtime:python27
api_version:1
threadsafe:true
handlers:- url:/
static_files:www/index.html
upload:www/index.html
- url:/(.*)
static_files:www/\1
upload:www/(.*)
I searched for others with the same problem suggesting spaces issues, so they were removed, but I couldn't solve it.
The yaml file was copied directly from google here: https://cloud.google.com/appengine/docs/standard/python/getting-started/hosting-a-static-website#uploading_your_files_to_google_app_engine
Wish I am a bit new to this.
Regards Ryan
source to share
Your app.yaml is NOT a direct cut and paste from the referenced link . The posted yaml is closed and does not parse correctly as yaml.
Try:
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
static_files: www/index.html
upload: www/index.html
- url: /(.*)
static_files: www/\1
upload: www/(.*)
source to share