google-app-engine-python

How to import google cloud speech recognition in Google App Engine (python)

若如初见. 提交于 2020-01-11 06:49:11
问题 I want to use google.cloud library on my Google App Engine python application. In my local all my tests work since I installed this library on my local. I was expecting it to be supported in GAE by default but it's not supported. This the error I got: from google.cloud import speech ImportError: No module named cloud I had a look at adding 3rd party libraries at https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27 After following the instructions I got

Cannot deploy App Engine Python 3 after cleanup Cloud Storage containers/images

百般思念 提交于 2020-01-04 15:15:26
问题 I was able to deploy app engine (python 3 standard environment) before with gcloud command. But a few days ago I accidentally removed all images under Cloud Storage ( gs://us.artifacts.[My-App-ID].appspot.com/containers/images ) and I can no longer deploy new apps to this app-id. Is there any way I can get back all the files under containers/images? Thanks! Here is the log obtained from Cloud Build details: starting build "a71fe78e-463c-43a5-a463-b7c30ce2331f" FETCHSOURCE BUILD Starting Step

Assigning static IP address to GAE python project

荒凉一梦 提交于 2020-01-03 03:58:05
问题 I have several python GAE projects that do not show up with gcloud compute instances list . I did manage to reserve an IP address which shows in gcloud compute addresses list . I've explored the Cloud interface and read docs https://cloud.google.com/compute/docs/instances-and-network and I am still at a loss how to make the app originate requests from a static IP address. 回答1: Ok, it doesn't look possible after eventually finding https://cloud.google.com/appengine/kb/#static-ip Thanks Google!

Undocumented Managed VM task queue RPCFailedError

六眼飞鱼酱① 提交于 2020-01-02 08:35:40
问题 I'm running into a very peculiar and undocumented issue with a GAE Managed VM and Task Queues. I understand that the Managed VM service is in beta, so this question may not be relevant forever, but it's definitely causing me lots of headache now. The main symptom of the issue is that, in certain (not completely known to me) circumstances, I'm seeing the following error/traceback: File "/home/vmagent/my_app/some_file.py", line 265, in some_ndb_tasklet res = yield some_task.add_async('some-task

GAE deferred task retried due to “instance unavailable” despite having already succeeded

非 Y 不嫁゛ 提交于 2019-12-31 02:43:07
问题 In our GAE application, we occasionally see TombstonedTaskError errors in deferred tasks due to named tasks being submitted multiple times with identical names. These tasks seem to be occasionally resubmitted automatically by GAE despite the first execution of the deferred task succeeding. An example can be seen in this log screenshot: the task "refresh_stock_status-1451012400-GNeg-completion-poll-2" was submitted on the morning of Dec 25th, and completed 12-25 07:35:05. The task was then,

GRPC and types import error in App Engine Datastore

[亡魂溺海] 提交于 2019-12-29 01:44:11
问题 I deployed my application in App engine successfully. However, when I try to access my API, I receive the following message: Error: Server Error The server encountered an error and could not complete your request. Please try again in 30 seconds. I'm unable to understand the cause of this issue, as it is coming from Datastore API. Can somebody please help me to troubleshoot this issue? Below is all the relevant information. Backtraces When referred to root of the URL 2018-03-27 08:08:45,090

Firebase ApplicationDefaultCredentials doesn't work in dev_appserver

荒凉一梦 提交于 2019-12-25 09:05:48
问题 I'm following the instructions on: https://cloud.google.com/solutions/using-firebase-real-time-events-app-engine I'm trying to get my dev_appserver to make credentialed requests to a firebase database. This works after I've deployed, but not locally. I've run gcloud auth application-default login and have set up my credentials as follows: try: from functools import lru_cache except ImportError: from functools32 import lru_cache import json import httplib2 from oauth2client.client import

Exporting data from local standard environment and importing it in Datastore Emulator

可紊 提交于 2019-12-25 08:20:28
问题 We have two app engine apps, which read/save to the same datastore (that is, same project). Datastore is actually the way they "transfer data" to each other. One of the apps is running on standard environment, and the other is running in the flexible environment. In the flexible environment, to run local tests in my machine, without using google datastore servers, I have to use the Datastore Emulator, which it's configured already. What I would like now is to find a simple way to export data

Google App Engine deploy with Django module after gcloud update?

巧了我就是萌 提交于 2019-12-24 12:34:12
问题 We are deploying to GAE using Django 1.7 (we are sending it as a symlinked module of our virtualenv ). Everything was fine up until the latest update of the gcloud tools. Now when we execute $ gcloud preview app deploy app.yaml we get: Updating module [default]...failed. ERROR: (gcloud.preview.app.deploy) Error Response: [400] Invalid JSON payload received. Unknown name "datata_devops/local/libs/django /contrib/formtools/locale/hr/_lc_messages/django.mo" at 'version.deployment.files[2368]':

How can I query Google App Engine entities by name to convert to new names?

坚强是说给别人听的谎言 提交于 2019-12-23 06:13:34
问题 I want to convert some Entities to new names. How can I query entities not having model class defined. For example I have such entity (it simplified to be more readable): class Some(ndb.model): name = ndb.StringProperty() I want to rename it to: class SomeFile(ndb.model): name = ndb.StringProperty() How can I do it? If will rename Some to SomeFile there will be no more Some to query but only data in datastore. 回答1: You can change your Model class name and have it point to an existing