I am following google app engine getting started tutorials. I am at this point; https://developers.google.com/appengine/docs/python/gettingstartedpython27/templates
I have tried to follow it to the point, but when I started my application from google app engine launcher, I see this in the logs;
---- a long traceback, followed by ----
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\yaml_listener.py", line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: Unexpected attribute 'indexes' for object of type AppInfoExternal.
in "C:\Users\muhammed\Desktop\guestbook\app.yaml", line 18, column 1
2013-09-12 13:01:26 (Process exited with code 1)
Here is how my app.yaml file looks like;
application: your-app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: guestbook.application
libraries:
- name: webapp2
version: latest
- name: jinja2
version: latest
indexes:
- kind: Greeting
ancestor: yes
properties:
- name: date
direction: desc
What am I doing wrong here?
The tutorial doesn't tell you to put indexes into app.yaml. They go in a separate file, index.yaml. But you usually don't have to bother, as the dev server will create them for you when you run your code locally.
Related
here is my yaml file , I don't know where I went wrong. php just give back Error: Server Error for a test echo.
runtime: php55
api_version: 1
instance_class: B1
basic_scaling:
max_instances: 1
idle_timeout: 5m
handlers:
# Serve php scripts.
- url: /(.+\.php)$
script: \1
env_variables:
# Replace project, instance, database, user and password with the values
obtained
# when configuring your Cloud SQL instance.
MYSQL_DSN: mysql:unix_socket=/cloudsql/XXXXX-166105:us-
east1:XXXX;dbname=XXXX
MYSQL_USER: root
MYSQL_PASSWORD: 'XXXXXXX'
Your YAML is syntactically incorrect
You need to put obtained after values or comment out that line.
Remove the newline between us- and east .
You can e.g. try this out at this site and get better feedback than you get from your PHP based parser (which is not a very good implementation of a YAML parser).
Without those fixes you will not be able to proceed to fixing any semantic errors your YAML document might (still) have.
I am running into this error while deploying my app to google app-engine.
Error:
Error 404: --- begin server output ---
This application does not exist (project_id=u'homework-153002'). To create an App Engine application in this project, run "gcloud beta app create" in your console.
--- end server output ---
When I try to create the app using the above command this is what I see:
ERROR: (gcloud.beta.app.create) You do not have permission to access app [homework] (or it may not exist): Operation not allowed
I have created a project in google developers api website with project_name of "homework" and random id. Here is the url for that:
https://console.developers.google.com/apis/library?project=homework-153002
Any pointers on what I might be doing wrong here?
This is my yaml file:
application: homework-153002
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
Your app URL indicates your app ID is homework-153002, but the
error message indicates you're connecting to an ap called homework - likely not your own, hence the permission issue.
Simply correcting the app ID in your deployment command and/or your app.yaml file should suffice.
As your comment indicates, for your case (gcloud deployment) the solution was:
gcloud config set project homework-153002
gcloud beta app create
appcfg.py update homework/
I keep getting the below error while trying to create a bulkloader_config
HTTPError: HTTP Error 404: Not Found
[ERROR ] Authentication Failed: Incorrect credentials or unsupported authentication type (e.g. OpenId).
Command I am trying to execute
appcfg.py create_bulkloader_config --filename=bulkloader.yaml --url=https://<app-id>.appspot.com/_ah/remote_api --application=s~<app-id>
app.yaml as below
application: <app-id>
version: alpha-1-1-2
runtime: python27
api_version: 1
threadsafe: yes
builtins:
- appstats: on
- remote_api: on
Help appreciated as to what could be going wrong. The username and password are spot on.
Problem fixed via Google Cloud support:
I removed the /_ah/spi/* handler from my endpoints yaml file, and the
- url: /.*
script: api.app
did not instantiate the endpoint.
It used to work before since the API was deployed for the previous version, but with the new version, there was nothing explicit to deploy the endopoints. So handlers need to be
handlers:
- url: /_ah/spi/.*
script: api.app
- url: /.*
script: api.app
Keeping the issue below for reference purposes
I've just deployed a new version of my application, and calls to http://app.appspot.com/_ah/api/app/version/method now return a 404. It worked perfectly before the update.
However, there's no trace at all in the logs, and no instance launched when I call/ping those URIs.
While if I call /_ah/whatever/app/version/method, I still have a 404, but it appears in my module logs, and it has the following message
{"state": "APPLICATION_ERROR", "error_message": "Not Found"}
The app is configured using modules, my app.yaml is defined with
application: appname
version: 2015-04-07
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /_ah/spi/.*
script: api.api.app
- url: /.*
script: www.www.app
secure: always
libraries:
- name: pycrypto
version: latest
- name: endpoints
version: 1.0
- name: webapp2
version: latest
- name: jinja2
version: latest
And, in api/api.yaml
application: appname
module: default
version: 2015-04-07
runtime: python27
api_version: 1
threadsafe: true
inbound_services:
- warmup
handlers:
- url: /.*
script: api.app
libraries:
- name: pycrypto
version: latest
- name: endpoints
version: 1.0
- name: ssl
version: latest
I've updated the app to serve this new version in the admin console, and all other modules work perfectly.
Also, I can't see my API in the API explorer, https://appname.appspot.com/_ah/api/explorer returns an empty list (while I see it when running the dev server on localhost).
Update: I've just noticed, looking at #bossylobster reply in GAE cloud endpoints - Api not updating after deploy, that I do not have "Successfully updated API configuration" in my logs after the "Completed update of a new alternate version". However, I have "API deletion serving" at about the time everything started to be 404. Yet, I have no idea why there's this API deletion query in my logs. Any idea of what can be wrong?
That's an app in production and so the mobile version is down at the moment. I'm happy to send the app ID to a devrel in PM if that helps.
I am using github.com/golang/appengine and its associated "datastore". I was hoping this package would allow me to use Datastore in a normal Go website. Unfortunately, my
c := appengine.NewContext(rq)
keeps giving my a "NewContext passed an unknown http.Request" error. My app.yaml contains
application: sdklessdatastoremusic
version: 1
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
vm: true
manual_scaling:
instances: 1
What should that YAML be, or is the problem elsewhere?
The App Engine packages only apply for when you are running on App Engine itself, not elsewhere.