Reputation: 41
I've been running python 2.7 apps on GCP for about 5 years and deploying using the App Engine Launcher.
Now that AEL is deprecated I'm trying to deploy via gcloud and get "ERROR: (gcloud.app.deploy)"
I can use gcloud to run the project locally so I have confidence that the project is setup correctly and in the right directory locally.
I ran gcloud auth login to give myself permission to upload to the project.
But when I try to redeploy my app I get an error:
DEBUG: Running gcloud.app.deploy with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.app.deploy', usage=None, description='Deploy the local code and/or configuration of your app to App Engine.', version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), account=None, authority_selector=None, authorization_token_file=None, bucket=None, calliope_command=<googlecloudsdk.calliope.backend.Command object at 0x037D1F90>, command_path=['gcloud', 'app', 'deploy'], configuration=None, credential_file_override=None, deployables=[], docker_build=None, document=None, flatten=None, format=None, h=None, help=None, http_timeout=None, ignore_bad_certs=False, image_url=None, log_http=None, project='MY_PROJECT', promote=None, quiet=None, server=None, skip_image_url_validation=False, skip_staging=False, stop_previous_version=None, trace_email=None, trace_log=None, trace_token=None, user_output_enabled=None, verbosity='debug', version=None).
DEBUG: API endpoint: [https://appengine.googleapis.com/], API version: [v1beta5]
You are creating an app for project [MY_PROJECT].
WARNING: Creating an app for a project is irreversible.
DEBUG: (gcloud.app.deploy)
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 740, in Execute
resources = args.calliope_command.Run(cli=self, args=args)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 1684, in Run
resources = command_instance.Run(args)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\surface\app\deploy.py", line 53, in Run
return deploy_util.RunDeploy(args)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 374, in RunDeploy
app = _PossiblyCreateApp(api_client, project)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 507, in _PossiblyCreateApp
create_util.CreateAppInteractively(api_client, project)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\create_util.py", line 109, in CreateAppInteractively
all_regions = sorted(set(api_client.ListRegions()))
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\appengine_api_client.py", line 415, in ListRegions
self.client.apps_locations.List, request)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\api\requests.py", line 67, in MakeRequest
raise err() if err else exc
NotFoundError
ERROR: (gcloud.app.deploy)
It doesn't give me much to go on. Wondering if it is a problem with app.yaml or some other basic issue.
gcloud info
Google Cloud SDK [138.0.0]
Platform: [Windows, x86_64]
Python Version: [2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]]
Python Location: [C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\python.exe]
Site Packages: [Disabled]
Installation Root: [C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk]
Installed Components:
bundled-python: [2.7.10]
app-engine-python: [1.9.49]
bq-win: [2.0.24]
core: [2016.12.09]
core-win: [2016.11.07]
gcloud: []
windows-ssh-tools: [2016.05.13]
app-engine-python-extras: [1.9.49]
gsutil: [4.22]
bq: [2.0.24]
powershell: [1.0.0.1]
gsutil-win: [4.20]
System PATH: [C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\..\bin\sdk;C:\Users\Jay-swtchbk\Miniconda2\condabin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\WINDOWS\System32\OpenSSH\;C:\Users\Jay-swtchbk\AppData\Roaming\Dashlane\4.6.5.21982\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\Jay-swtchbk\AppData\Local\Microsoft\WindowsApps;C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Google\google_appengine\]
Cloud SDK on PATH: [True]
Kubectl on PATH: [False]
WARNING: There are old versions of the Google Cloud Platform tools on your system PATH.
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\dev_appserver.py
C:\Program Files (x86)\Google\google_appengine\dev_appserver.py
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gsutil.cmd
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\git-credential-gcloud.cmd
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\bq.cmd
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud-ps.ps1
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gsutil-ps.ps1
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\bq-ps.ps1
C:\Program Files (x86)\Google\google_appengine\endpointscfg.py
C:\Users\Jay-swtchbk\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\endpointscfg.py
Installation Properties: [C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\properties]
User Config Directory: [C:\Users\Jay-swtchbk\AppData\Roaming\gcloud]
Active Configuration Name: [tvpub1]
Active Configuration Path: [C:\Users\Jay-swtchbk\AppData\Roaming\gcloud\configurations\config_tvpub1]
Account: [*******@gmail.com]
Project: [MY_PROJECT]
Current Properties:
[core]
project: [MY_PROJECT]
account: [******@gmail.com]
disable_usage_reporting: [False]
app.yaml contents:
runtime: python27
api_version: 1
threadsafe: false
libraries:
- name: jinja2
version: latest
- name: webapp2
version: latest
- name: lxml
version: latest
- name: numpy
version: "1.6.1"
builtins:
- remote_api: on
inbound_services:
- mail
handlers:
- url: /assets
static_dir: assets
- url: /static
static_dir: static
- url: /admin/.*
script: MY_PROJECT.app
login: admin
- url: /favicon\.ico
static_files: assets/img/favicon.ico
upload: assets/img/favicon\.ico
- url: /.*
script: MY_PROJECT.app```
Upvotes: 2
Views: 895
Reputation: 41
Solved, for those who having similar issues:
I Was using:
But it works if you specify the version flag (which is optional according to Google's documentation)
Upvotes: 1