google-app-engineyamldev-appserver

Google App Engine dispatch.yaml Unexpected attribute 'service'


I am having some trouble getting my dispatch.yaml file to run on the local devappserver. I have had two errors one seems to be related to indentation expecting <block end>, but found ? I can fix this by removing the indentation as shown below in my dispatch file.

The second problem happens when I have removed the indentation I get Unexpected attribute 'service' of type DispachInfoExternal I have tried copying the example from the google docs but I get the same error, I have also tried changing the name service to module as I believe that was the old name and I get the same error. I am using Atom as my editor.

dispatch:
- url: '*/content/*'
service: default

- url: '*/admin/*'
service: admin-services

- url: '*/creator/*'
service: creator-services

- url: '*/social/*'
service: social-services

- url: '*/subs/*'
service: subscription-services

- url: '*/user/*'
service: user-services

Solution

  • You're missing the indentation from the yaml files.

    It's different writing

    dispatch:
    - url: '*/content/*'
    service: default
    

    than

    dispatch:
    - url: '*/content/*'
      service: default