gcloud

Google Pubsub Python Client library subscriber crashes randomly

依然范特西╮ 提交于 2019-12-11 07:36:51
问题 Please could someone help me with the Google Pubsub Python Client Library? I am following the tutorial at https://cloud.google.com/pubsub/docs/pull#pubsub-pull-messages-async-python closely and seem to get unprompted errors. I have a simple script called "sendmessage.py" that sends a text message with a random number appended so that I can tell messages apart. The subscriber code runs on a separate compute engine instance and looks like this: from google.cloud import pubsub_v1 def callback

Unable to run gcutil from command line

送分小仙女□ 提交于 2019-12-11 07:25:26
问题 When I try to install gcutil by following steps on https://developers.google.com/compute/docs/gcutil/ here is the bin dir contents of C:\gcutil\google-cloud-sdk\bin : but gcutil does not seem to install correctly. When I attempt to run gcutil I receive the error : C:\gcutil\google-cloud-sdk\bin>gcutil 'gcutil' is not recognized as an internal or external command, operable program or batch file. Should gcutil not be a .bat file command ? How can I invoke gcutil ? 回答1: You do not need to

Any gcloud Command Fails With ImportError: No module named __future__ Mac [duplicate]

↘锁芯ラ 提交于 2019-12-11 06:59:24
问题 This question already has answers here : Mac gcloud install ImportError: No module named __future__ (3 answers) Closed 10 months ago . I'm on MacOS. My default python is a virtual environment created from a brew install of Python 2.7.15. My PATH is set up so that the venv is the default python and python2.7 . I had some issues installing gcloud that have been resolved and I have successfully installed gcloud. However, any time I try to run any gcloud command I still get the same ImportError I

Golang code is not inserting on BigQuery's table after I have created it from code

放肆的年华 提交于 2019-12-11 06:55:58
问题 I have a BigQuery table with this schema: name STRING NULLABLE age INTEGER NULLABLE amount INTEGER NULLABLE And I can succesfully insert on the table with this code: ctx := context.Background() client, err := bigquery.NewClient(ctx, projectID) if err != nil { log.Fatal(err) } u := client.Dataset(dataSetID).Table("test_user").Uploader() savers := []*bigquery.StructSaver{ {Struct: test{Name: "Sylvanas", Age: 23, Amount: 123}}, } if err := u.Put(ctx, savers); err != nil { log.Fatal(err) } fmt

SSL: no alternative certificate subject name matches target host name $name.storage.googleapis.com

会有一股神秘感。 提交于 2019-12-11 06:27:01
问题 I want to run tensorflow traning script in google cloud ml. One of the buckets from an external project. I have created cloud ml engine service account and add it as an user to this external project. After that, have executed the following command in my terminal with gcloud initialised project: gcloud auth activate-service-account --my-service-acc-key.json And then submit my job as: gcloud ml-engine jobs submit training ..arguments Job was submitted successfully and was running until

Why subfolders are not deployed to Google App Engine nodejs app

前提是你 提交于 2019-12-11 06:12:22
问题 I am developing nodejs web app and trying to run it in the Google cloud. Only files in the root folder get deployed to Google App Engine using gcloud app deploy command. The appengine/express sample app depends on subfolders and doesn't work when deployed Steps to reproduce: create simple app with package.json, app.yaml, app.js create some folders, put some files in them install gcloud, run gcloud app deploy from application folder if you required any local modules located in a subfolder,

Docker in Google App Engine Flexible health check has wrong URL

旧时模样 提交于 2019-12-11 06:11:10
问题 My service uses a url like this: <google_url>/v1/lookup_stuff <google_url>/v1/ is the base url for everything in the service, so when the health check pings <google_url> it gets a 404. I need to update to ping <google_url>/v1/ (Possibly useful information, the service is in Docker, and is accessible when I manually go to the right URL) How do I point gcloud's health service at the correct URL for my service? Ok for clarity: Google url: service-something.appspot.com All urls for service are

Hyperparameter tuning locally — Tensorflow Google Cloud ML Engine

吃可爱长大的小学妹 提交于 2019-12-11 06:08:50
问题 Is it possible to tune hyperparameters using ML Engine to train the model locally? The documentation only mentions training with hyperparameter tuning in the cloud (submitting a job), and has no mention to doing so locally. Otherwise, is there another commonly used hyperparameter tuning that passes in command arguments to task.py as in the census estimator tutorial? https://github.com/GoogleCloudPlatform/cloudml-samples/tree/master/census 回答1: You cannot perform HPTuning (Bayesian

Batch with Google Bigquery and Python

冷暖自知 提交于 2019-12-11 05:47:00
问题 What's the most efficient way to perform a batch insert in python using Google Bigquery Api. I was tryng to perform a stream row using this code on a large dataset (1 000 000 +) but it's taking a while to insert them. Is there a more efficient way to insert a large dataset in Python? The table already exists, and it has info. I have a list of 1 millon datapoints I want to insert I'd like to do it with Python, because I'll reuse the code many times. 回答1: I don't think Streaming (Insert All API

GCloud: Debug “function crashed out of request scope”

无人久伴 提交于 2019-12-11 05:27:38
问题 I'm running a GCloud function , which seems to crash silently , without any kind of error trace. Everything works perfectly in the emulator but crashes when running on GCloud ! The following message shows up in the function's logs: Error: function crashed out of request scope Function killed. Any idea on how to debug this? 回答1: I think this issue has to do with what you are returning, and how you returning it. In the production environment, if you do not properly return a promise your