How do I deploy Django app to app engine

61 views
Skip to first unread message

baturay Alhaj Ahmad

unread,
Jan 16, 2019, 9:13:49 AM1/16/19
to Google App Engine
Hello all,

I am having with my app.yaml file when trying to deploy a django app to app engine using gcloud app deploy command.
I am able to deploy the app if I declare python version as 27 but if I declare the verion as 37 I always get the below error
Updating service [default]...failed.                                                                                                                
DEBUG: (gcloud.app.deploy) Error Response: [13] Failed to create manifest file.
Traceback (most recent call last):
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 987, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 795, in Run
    resources = command_instance.Run(args)
  File "/home/bats/Downloads/google-cloud-sdk/lib/surface/app/deploy.py", line 90, in Run
    parallel_build=False)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 624, in RunDeploy
    flex_image_build_option=flex_image_build_option)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 422, in Deploy
    extra_config_settings)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 207, in DeployService
    poller=done_poller)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 315, in WaitForOperation
    sleep_ms=retry_interval)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 254, in WaitFor
    sleep_ms, _StatusUpdate)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 316, in PollUntilDone
    sleep_ms=sleep_ms)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", line 229, in RetryOnResult
    if not should_retry(result, state):
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 310, in _IsNotDone
    return not poller.IsDone(operation)
  File "/home/bats/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 184, in IsDone
    encoding.MessageToPyValue(operation.error)))
OperationError: Error Response: [13] Failed to create manifest file.
ERROR: (gcloud.app.deploy) Error Response: [13] Failed to create manifest file.



my app.yaml looks like this 
runtime: python37
instance_class: F2

beta_settings:
    cloud_sql_instances: neverland:europe-west3:neverlandsql2


handlers:
- url: /static
  static_dir: static/

- url: /.*
  secure: always
  redirect_http_response_code: 301
  script: auto


env_variables:
  # vars


Any idea why this is happening ??

thanks.

George (Cloud Platform Support)

unread,
Jan 18, 2019, 2:24:06 PM1/18/19
to Google App Engine
Hello Baturay, 

What is the value of the CLOUDSDK_PYTHON variable at the moment of attempted deployment? Support for version 3.7 is experimental, at present. 

This error is related to the Python version used by the SDK: currently gcloud requires Python version 2.7.x and there is experimental support for 3.4 and up. You can check this by running the gcloud topic startup command on the CLI. Experimental support is what it says, so in this case you cannot deploy your app with CLOUDSDK_PYTHON set to python37. Things should progress towards full support; meanwhile, we should exercise patience. 

This situation should not prevent you from using whatever Python version you need for your project, and your app itself. 
Reply all
Reply to author
Forward
0 new messages