google-cloud-sdk

google dev_appserver throws error 'python2: command not found' after upgrade to python 3.7

♀尐吖头ヾ 提交于 2020-08-09 06:59:25
问题 Until yesterday I was successfully using the dev_appserver.py app.yaml --enable_console for my development. Yesterday I attempted to upgrade to python 3.7 for my development. The upgrade seemed to be Ok, but now I get the following error message. server:bones brian$ dev_appserver.py app.yaml --enable_console ERROR: (dev_appserver) python2: command not found app.yaml: application: bones version: 1 runtime: python37 entrypoint: gunicorn -b :$PORT main:app api_version: 1 threadsafe: true

Angular 7 Routing in Google Cloud App Engine not working

谁说胖子不能爱 提交于 2020-07-06 09:44:28
问题 I've published an angular 7 Application to Google Cloud App Engine. The index page is loading, but the subdirectorys give me Error: Not Found The requested URL /admin was not found on this server. This is my app.yaml: runtime: nodejs10 env_variables: environment: "--prod" handlers: - url: / static_files: dist/XXX/index.html upload: dist/XXX/index.html - url: / static_dir: dist/XXX/ - url: /.* secure: always script: auto Edit: I finally figured out, how the routing in app.yaml works for

Network connection problems in Google Cloud SDK while I have access to google or website like google app engine in my browser

风流意气都作罢 提交于 2020-05-27 09:43:15
问题 I created an account on Google App Engine, then I installed google-cloud-sdk by gcloud init, and get the following error: Pick configuration to use: [1] Re-initialize this configuration [a] with new settings [2] Create a new configuration [3] Switch to and re-initialize existing configuration: [default] Please enter your numeric choice: 1 Your current configuration has been set to: [a] You can skip diagnostics next time by using the following flag: gcloud init --skip-diagnostics Network

Is there a way to use an http proxy for google-cloud-cpp?

杀马特。学长 韩版系。学妹 提交于 2020-05-17 06:01:40
问题 I am using google-cloud-cpp (C++ API for Google Cloud Platform functions) to create/read/write to buckets. When I am working from within the organization's firewall, I have to use a proxy to be able to connect to google cloud. I see that we can configure a proxy using the gcloud command line: gcloud config set proxy/type http gcloud config set proxy/address x.x.x.x gcloud config set proxy/port Can I do something similar when I use google-cloud-cpp? 回答1: If we look at the source code of the

Using python to write Google Cloud SDK Shell commands

落花浮王杯 提交于 2020-04-18 05:45:41
问题 I made a bot that's running on a google cloud VM. I got everything working and in order to access the data that my bot is writing out, I have to go open up the Google Cloud SDK Shell and type: gsutil cp gs://bucket_name/file.xlsx C:\\Users\\User\\Documents\\file.xlsx The whole point of me going through the trouble of making a bot on a 3rd party server is to automate a process as much as i can. So I was wondering if there is any way for me to write a python script that tells the GC SDK Shell

-bash: gcloud: command not found on Mac

混江龙づ霸主 提交于 2020-04-08 00:23:59
问题 I'm following the Quickstart for Mac OS X to install the cloud SDK. Following the steps exactly, 1) python -V returns "Python 2.7.10" 2) Download and extract using ./install.sh the 64bit version of the SDK in google-cloud-sdk returns... Welcome to the Google Cloud SDK! To help improve the quality of this product, we collect anonymized usage data and anonymized stacktraces when crashes are encountered; additional information is available at <https://cloud.google.com/sdk/usage-statistics>. You

-bash: gcloud: command not found on Mac

北慕城南 提交于 2020-04-08 00:22:12
问题 I'm following the Quickstart for Mac OS X to install the cloud SDK. Following the steps exactly, 1) python -V returns "Python 2.7.10" 2) Download and extract using ./install.sh the 64bit version of the SDK in google-cloud-sdk returns... Welcome to the Google Cloud SDK! To help improve the quality of this product, we collect anonymized usage data and anonymized stacktraces when crashes are encountered; additional information is available at <https://cloud.google.com/sdk/usage-statistics>. You

Error running endpointscfg.py get_swagger_spec

核能气质少年 提交于 2020-02-25 21:46:50
问题 I am trying to build a project using Google Cloud Endpoints, following this guide: Quickstart for Cloud Endpoints Frameworks on App Engine. I am stuck at the step of generating the OpenAPI configuration file, where I need to run this command: Attempt One $ lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com I get this error: -bash: lib/endpoints/endpointscfg.py: Permission denied Attempt Two I have tried the same command with sudo , which returned

Error running endpointscfg.py get_swagger_spec

北慕城南 提交于 2020-02-25 21:44:22
问题 I am trying to build a project using Google Cloud Endpoints, following this guide: Quickstart for Cloud Endpoints Frameworks on App Engine. I am stuck at the step of generating the OpenAPI configuration file, where I need to run this command: Attempt One $ lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com I get this error: -bash: lib/endpoints/endpointscfg.py: Permission denied Attempt Two I have tried the same command with sudo , which returned

how to upload file line by line to google cloud storage in java

早过忘川 提交于 2020-02-04 01:20:25
问题 I have the following code: String fullFileUrl = fileUrl; Storage storage = StorageServiceHolder.getStorage(); BlobId blobId = GCSHelper.uri2blobId(fullFileUrl); while (!queue.isEmpty()) { try { String line = queue.poll(1000, TimeUnit.SECONDS); InputStream inputStream = new ByteArrayInputStream(line.getBytes()); BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType("text/plain").build(); Blob blob = storage.create(blobInfo, inputStream); } catch (InterruptedException e) { log.error(