Hello,

I'm a beginner with Appengine / Python and I work on OSX Yosemite.

I'm following the Managed VM Python tutorial: 
https://cloud.google.com/appengine/docs/managed-vms/tutorial/step1
I'm at step 6 and everything is Ok.

But there is something I don't understand.
- Deployment with gcloud preview app deploy ./app.yaml is Ok
- Deployment with "gcloud preview app run ./app.yaml" is Ok if I export 
GAE_LOCAL_VM_RUNTIME=0.  In that case, my app is running in a local 
container (version 1.7) and I can access it.

*But I'm struggling with: "gcloud preview app run ./app.yaml" *when 
GAE_LOCAL_VM_RUNTIME is undefined or set to 1.

In that case launch is OK.

cmorisse@dueto:appengine-vm-fortunespeak-python$ gcloud preview app run ./
app.yaml
Module [default] found in file [/Users/cmorisse/dev-inouk/appengine/
appengine-vm-fortunespeak-python/app.yaml]
INFO: Looking for the Dockerfile in /Users/cmorisse/dev-inouk/appengine/
appengine-vm-fortunespeak-python
INFO: Using Dockerfile found in /Users/cmorisse/dev-inouk/appengine/
appengine-vm-fortunespeak-python
INFO     2015-08-13 13:41:07,025 application_configuration.py:399] No 
version specified. Generated version id: 20150813t134107
INFO     2015-08-13 13:41:07,025 devappserver2.py:763] Skipping SDK update 
check.
INFO     2015-08-13 13:41:07,056 api_server.py:205] Starting API server at: 
http://localhost:50839
INFO     2015-08-13 13:41:07,061 dispatcher.py:197] Starting module 
"default" running at: http://localhost:8080
INFO     2015-08-13 13:41:07,063 admin_server.py:118] Starting admin server 
at: http://localhost:8000
INFO     2015-08-13 13:41:08,073 module.py:1767] New instance for module 
"default" serving on:
http://localhost:8080
INFO     2015-08-13 13:41:08,500 module.py:809] default: "GET /_ah/start 
HTTP/1.1" 404 233



*But when I access http://localhost:8080, I get:*

ERROR    2015-08-13 13:44:56,125 app.py:1423] Exception on / [GET]
Traceback (most recent call last):
  File 
"/Users/cmorisse/dev-inouk/appengine/appengine-vm-fortunespeak-python/lib/flask/app.py"
, line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File 
"/Users/cmorisse/dev-inouk/appengine/appengine-vm-fortunespeak-python/lib/flask/app.py"
, line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File 
"/Users/cmorisse/dev-inouk/appengine/appengine-vm-fortunespeak-python/lib/flask/app.py"
, line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File 
"/Users/cmorisse/dev-inouk/appengine/appengine-vm-fortunespeak-python/lib/flask/app.py"
, line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File 
"/Users/cmorisse/dev-inouk/appengine/appengine-vm-fortunespeak-python/lib/flask/app.py"
, line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File 
"/Users/cmorisse/dev-inouk/appengine/appengine-vm-fortunespeak-python/main.py"
, line 11, in fortune
    msg = subprocess.check_output('fortune')
AttributeError: 'module' object has no attribute 'check_output'

It seems to me, that my program is running within the sandboxed SDK that 
explains check_output is unavailable.

I'm surprised as I would think that with these lines in my app.yaml
runtime: python27
vm: true
then gcloud preview app run ./app.yaml will do a "dockerless" build and run 
my app locally without the
constraints of the sandboxed app.

Any idea about what I'm missing ?

Thanks,
Cyril

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/89ce970b-71f6-4967-81c6-68c78841a707%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to