Can't run sample applications on AppEngine Stanadard Python3.7 redux

2,254 views
Skip to first unread message

dk1...@gmail.com

unread,
Sep 30, 2018, 1:56:23 PM9/30/18
to google-a...@googlegroups.com
In https://groups.google.com/forum/#!topic/google-appengine/D_upGqj4zMY, Stewart Reichling says: 
  • for Python 3.7, we recommend using Python's idiomatic development practices, as listed on this page
In my local environment I've created a python 3.7 virtual environment and installed Flask and successfully run the hello world app from

python-docs-samples/appengine/standard_python37/hello_world

But when I do a gcloud app deploy, it gives the error:

Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 0 files to Google Cloud Storage                ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project *** before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=ham-50532 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

Going to the console it says billing needs to be enabled. That has never happened to any other apps I've deployed to the standard environment.   What other settings are needed to run hello_world in the standard environment with free quotas?  I've updated my local Google Cloud SDK to version 218.0.0, and I get the identical error when I try to deploy the same files from cloudshell.

Also, the hello_world app.yaml says "runtime: python37", but the cloudshell virtualenv in /usr/local/bin creates a python 3.5.3 environment.   Where is the cloudshell python37 installation located, from which a "python -m venv" command can be used to create a 3.7 environment?

George (Cloud Platform Support)

unread,
Sep 30, 2018, 2:33:08 PM9/30/18
to Google App Engine
You need to enable billing for your project from the Billing page in Developers' Console, and then enable Cloud Build API as well. You can do this by navigating to the Cloud Building API page, in the API Library in Cloud Developers' Console. 

How did you create the Python 3.7 virtual environment? One uses normally the virtualenv -p python3 env command. You can then verify what Python version is currently running in your virtual environment with the "g python --version" command. 

dk1...@gmail.com

unread,
Sep 30, 2018, 3:12:38 PM9/30/18
to Google App Engine
So you are saying that Python 2.7 standard environment projects can be hosted without billing, but Python 3.7 standard environment projects cannot?

The comparison page https://cloud.google.com/appengine/docs/standard/appengine-generation says explicitly that both environments have a free tier.  Apparently that is not true.

Stewart Reichling

unread,
Oct 1, 2018, 1:37:14 PM10/1/18
to Google App Engine
Hello,

Product Manager for App Engine here. Both Python 2.7 and Python 3.7 on the App Engine standard environment have the same free tier -- read more here.

The difference is that Python 3.7 requires that you have a billing account on file. As long as your usage falls within the free tier allocation, you won't be charged. You can use spending limits to minimize any costs in case you do exceed the free tier.
Reply all
Reply to author
Forward
0 new messages