0

Context: Following, "How to Use Pub/Sub with Python".

Problem: The following error is being thrown while Deploying an app to Google Cloud Platform:

Error Response: [13] Could not pick a region and/or zone

Resolutions attempted:

  1. Ran gcloud init to re-apply region/zone settings.
  2. Set ZONE in config.py to "us-central1-f".
  3. Reset Google Cloud API with gcloud config set app/use_appengine_api false.

gcloud info response:

Google Cloud SDK [90.0.0]

Platform: [Mac OS X, x86_64]
Python Version: [2.7.10 (default, Oct 23 2015, 18:05:06)  [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]]
Python Location: [/Users/.../getting-started-python/6-pubsub/env/bin/python2]
Site Packages: [Enabled]

Installation Root: [/Users/user/google-cloud-sdk]
Installed Components:
  core: [2015.12.07]
  core-nix: [2015.11.24]
  gcloud: []
  gsutil-nix: [4.15]
  gsutil: [4.16]
  bq: [2.0.18]
  bq-nix: [2.0.18]
System PATH: [...]
Cloud SDK on PATH: [True]

Installation Properties: [/Users/user/google-cloud-sdk/properties]
User Config Directory: [/Users/user/.config/gcloud]
User Properties: [/Users/user/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [*******]
Project: [*******]

Current Properties:
  [core]
    project: [*******]
    account: [*******]
    disable_usage_reporting: [True]
  [app]
    use_appengine_api: [true]
    suppress_change_warning: [true]
  [compute]
    region: [us-central1]
    zone: [us-central1-f]

Logs Directory: [/Users/user/.config/gcloud/logs]
Last Log File: [/Users/user/.config/gcloud/logs/2015.12.30/14.29.56.415916.log]
Lindauson
  • 2,963
  • 1
  • 30
  • 33

2 Answers2

2

Try gcloud config set compute/zone us-central1-f

Valentin
  • 917
  • 14
  • 19
  • Thanks for all your help with this Valentin. I tried the above but the result is the same. – Lindauson Dec 30 '15 at 19:55
  • Sounds like a bug. Can you please go to the documentation page and file a bug? Alternatively you can file one with `gcloud feedback` after running the command that didn't work. – Valentin Dec 30 '15 at 21:22
  • This error has been filed as Bug/Issue [452](https://code.google.com/p/google-cloud-sdk/issues/detail?id=452) – Lindauson Dec 30 '15 at 22:48
1

Recreating the project seems to have resolved the issue.

I haven't been able to identify a difference between the two project settings. I imagine the error might have occurred on Google's end while setting up the original project.

Lindauson
  • 2,963
  • 1
  • 30
  • 33
  • I marked this as the correct answer because it is now Google's official resolution in lieu of resolving the issue on their backend. See Bug/Issue [452](https://code.google.com/p/google-cloud-sdk/issues/detail?id=452). – Lindauson Jan 04 '16 at 16:32
  • Also, if you need to maintain your original project name see comment #8 on Bug/Issue [452](https://code.google.com/p/google-cloud-sdk/issues/detail?id=452). – Lindauson Jan 04 '16 at 16:50