Menu
  • HOME
  • TAGS

Can we use AsyncHttpClient in Google App Engine application

java,google-app-engine,asynchttpclient

No, you can't. Your options are to use: urlfetch, which is async too Urlconnection which is not, and is pretty low level Apache http client, which is socket based so doesn't use URL fetch Last time I tried to integrate Ning async client on appengine, the issue was it need...

GAE DOMDocument::load(): I/O warning : failed to load external entity

javascript,php,json,google-app-engine

For security reason GAE disables external XML entity loading by default (See https://cloud.google.com/appengine/docs/php/#PHP_Functions_that_may_be_manually_enabled for more details). You'll need to call libxml_disable_entity_loader(false) before loading the XML.

App Engine - NDB query with projection requires subproperty?

google-app-engine,gae-datastore,app-engine-ndb,google-app-engine-python

That query is not possible. Unfortunately the exception isn't very clear, but the issue is the result of how sub-properties are actually stored. ndb explodes your StructuredProperty so that each value is included separately. So, for example, the entity: Contact(name="Bob", addresses=[ Address(type="Work", city="San Francisco"), Address(type="Home", city="New York")]) This will get...

Google App Engine - Writing app.yaml for a particular url like applicationName.appspot.com/docs/ec-quickstart/index.html

python,css,google-app-engine,hosting

You need to specify rules for every piece you're going to serve and construct your html to reference them accordingly. Pay attention to the patterns as the 1st match will be used even if a more specific one follows below. The 1st attempt doesn't specify where your .css file exists....

jquery google app engine

jquery,google-app-engine

You need to import jquery. Try this fiddle $(document).ready(function() { $('img').click(function() { $(this).fadeOut('slow'); }); $('p').click(function() { $(this).fadeOut('slow'); }); alert("hi"); }); <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="/js/script.js"></script> </head> <img src="http://www.w3schools.com/images/w3schools.png"/> <p>Click Me</p> ...

Google-App-Engine[PHP]: Error trying to establish database connection

php,mysql,database,wordpress,google-app-engine

To whom, this may interest I have solved this problem with a work around. Since I was following the instructions from the web page: https://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/ I researched further on the contributors behind this helpful webpage, leading to the GitHub link: https://github.com/GoogleCloudPlatform/appengine-php-wordpress-starter-project Considering that this is updated up to this year...

Is it possible to use Google Cloud Endpoints built in authentication with Google+ Domains API?

google-app-engine,authentication,google-plus,google-cloud-endpoints,google-plus-domains

So, your use-case is: your users authenticate to your app, granting the basic userinfo.profile scope needed to get the com.google.appengine.api.users.User object properly received in your endpoints API you persist these User objects to the DB, and when you retrieve them to display the thread they commented in, you'd like to...

What is the equivalent of BlobstoreLineInputReader for targeting Google Cloud Storage?

python,google-app-engine,mapreduce,pipeline

At first, I attempted thinkjson's CloudStorageLineInputReader but had no success. Then I found this pull request...which led me to rbruyere's fork. Despite some linting issues (like the spelling on GoolgeCloudStorageLineInputReader), however at the bottom of the pull request it is mentioned that it works fine, and asks if the project...

Flask Python - Pull information from google datastore and display on own url

python,google-app-engine,flask

Both your render_template calls only pass a posts object: # in list_posts: return render_template('list_posts.html', posts=posts) # in display_posts: return render_template('display_posts.html', posts=posts) Your template however only refers to a singular post: {{ post.title }} (written by {{ post.author.nickname() }})<br /> {{ post.content }} So when jinja tries to render the template,...

No module named _mysql - Google App Engine & Django

python,mysql,django,google-app-engine

I've finally found a workaround. Simply adding MySQLdb to your GAE lib is not enough. MySQLdb tries to import _mysql which is a .so or .c file depends on what version of MySQLdb you use. It seems like importing them directly is not working correctly I suppose. Maybe because it's...

Unable to deploy an application module on AppEngine

google-app-engine,google-app-engine-python

Incrementing the version (in the .yaml files), redeploying both modules, and activating the new version finally solved the problem.

Duplicate symbols Apple Mach-O Linker Error

ios,objective-c,xcode,swift,google-app-engine

I figured out my issue. The Google API ServiceGenerator generates a bunch of files implementation and header files which the Google documentation states to add to your project. Unfortunately, it also generates a _Sources.m file with conflicting import statements. I deleted this file from my iOS Project and the project...

Could someone bring Google OAuth2 for Cloud DNS via Rest to light?

c#,api,rest,google-app-engine,dns

found some time to create a small sample application. You can find the code on github . You said you don't want to use the client_secrets.json. The only quick solution i found was to provide the necessary stuff via memory stream - there may be better ways. Most of the...

Google App Engine connection request timeout error

google-app-engine,connection-timeout

Your code looks correct. I am having the exact same issue with OMDB API and Google App Engine as of a few weeks ago. I reached out to Brian who runs OMDB API regarding this and I think it had to do with the App Engine IP range being blocked...

Angular route not working when used with Google App Engine and Flask

python,angularjs,google-app-engine,flask,angularjs-routing

Your solution got worked because by default html5mode is disabled, that is the reason why only the URL after # is recognized by the angular routing, and you putted route before your URL got it worked for you. Solution You need to enable html5mode in your application in order make...

In terms of back-end and front-end technology, what can GAE do that Web Hosting can't? [closed]

google-app-engine,web-hosting,lamp,paas,web-technologies

Adding to @Andrei's answer, the App Engine is all about a Platform as a Service (PAAS). For example, you wrote: In my mind - all I can picture is that they both serve HTML pages, CSS & JS files, images, videos, music, maybe pull data from a relational database, allow...

Scaling non-default version of Google App Engine Backend

python,google-app-engine

So it seems I can solve this problem using modules, which I switched a lot of my code to anyways for this iteration. Each module is capable of having its own default version. So, the first version of the app can still hit https://my-app.appspot.com, (and that will stay the default...

Python decimal.Decimal id not the same

python,json,google-app-engine,decimal

It appears that the decimal.Decimal class is patched somewhere in the Google App Engine SDK (or the module is reloaded), and this is done between the MySQL conversion library importing decimal and you importing the same. Luckily, we can work around this by updating MySQL conversion table: from MySQLdb.constants import...

GAE/P: Migrating to NDB efficiently

python,google-app-engine,app-engine-ndb

In your case the In-Context Cache will take over and save you the db calls: The in-context cache is fast; this cache lives in memory. When an NDB function writes to the Datastore, it also writes to the in-context cache. When an NDB function reads an entity, it checks the...

In Google App Engine for Go, how can a property have values of more than one type?

google-app-engine,go,gae-datastore

You do not necessarily have to declare a specific type for a property in a backing struct. By implementing the PropertyLoadSaver interface, you can dynamically do whatever you want with the properties of an entity during loading or before saving. See this answer which shows how to represent an entity...

AppEngine: Memcache without any instance

google-app-engine

Memcache is not persistent and can be evicted by memory pressure. Share memcache is shared with other apps. You can buy dedicated memcache for reserved amount. What you described does not seem to be a problem at all. One important question is, what is the timeout that you set?

Trying to download a file using Dropbox Java API in the GAE

java,google-app-engine

Got it! Thanks. ByteArrayOutputStream worked. So for anyone else trying to read a DropBox file in a Google App Engine environment (i.e. read into memory), here is what worked for me String fileName = "myfile.xml"; OutputStream out = new ByteArrayOutputStream(); try { dbxClient.getFile("/" + fileName, null, out); } catch (DbxException...

How to wrap error trace inside Log.Severe()

java,google-app-engine,logging

Logger#severe(msg) is just a convenience method for Logger#log(Level.SEVERE, msg) Use that method instead. LOG.log(Level.SEVERE, "Your Log Message", e); ...

Google App Engine: Unable to find 'increasing daily budget'

google-app-engine,payment

Using the new console, you can change your billing from your App Engine settings: https://console.developers.google.com/project/your-app-id/appengine/settings Make sure you've linked your project to a billing account. To do this, head over to your project-level settings: https://console.developers.google.com/project/your-app-id/settings If that still doesn't work, try the old console: https://appengine.google.com/billing/billing_status?&app_id=s~your-app-id. You must prepend the "s~"...

Sending mail by Unauthorised sender in Google AppEngine

python,google-app-engine,email,sendmail

From https://cloud.google.com/appengine/docs/python/mail/emailmessagefields sender The email address of the sender, the From address. The sender address must be one of the following types: The address of a registered administrator for the application. You can add administrators to an application using the Administration Console. The address of the user for the current...

Under GAE, can a Python function detect if it is running locally or in production?

google-app-engine

Have a read of this documentation on handling requests https://cloud.google.com/appengine/docs/python/requests#Python_The_environment specifically the section on the environment. You will see a number of potentially relevant environment variables. The one you want is SERVER_SOFTWARE . It will contain "Development" in the value. Also this has been answered before on SO. In Python,...

Define a static IP for a managed VM

google-app-engine

You'll need to switch the VM instance to "user-managed" to assign a static IP address.

Generate unique Long Id on App Engine

google-app-engine,objectify,google-datastore

If you want a value that is equivalent to the autogenerated id, call: factory().allocateId(Thing.class).getId(); Alternatively, you can use the allocateIds method on the underlying DatastoreService of the low level API. Or even UUID.randomUUID(). However, this sounds weird. Generally you want to be able to map from a Facebook id or...

Objectify - should I create an entity super class?

java,google-app-engine,objectify

It can be helpful to have a common base class, but you almost certainly do not want to make it part of a polymorphic entity hierarchy. Don't use @Subclass for this purpose; you don't need it: public class ModelEntity { @Id Long id; } @Entity public class User extends ModelEntity...

Cloud Endpoints is REST or RPC style technology?

google-app-engine,google-cloud-endpoints

REST or RPC style refers to the protocol. Both of them call procedures to be executed on the server. However, REST style often focuses more on CRUD-style and operating over resources, where RPC style is more procedural. Cloud Endpoints lets you define your API once and exposes interfaces in both...

GAE/Python best practice for a pop-up alert?

python,html,google-app-engine

You should use both approaches. The approach where you simply show an error page is the right way to handle the issue both from a security perspective (validation needs to happen on the server, because the form can be submitted in a way that bypasses validation in JavaScript) and from...

upload CSV file to database on Google app engine using Python

python,database,google-app-engine,csv,upload

You can upload your files into blobstore, using blobstore api Once you upload your file in blobstore, you get blobkey, then you can use blobreader, to read csv file content and store them according in your database. Hope it helps....

Google AppEngine channel is opened, client is receiving responses, but socket.onmessage is not being called

javascript,google-chrome,google-app-engine,long-polling,channel-api

We have been using this as well and faced the same issue, this workaround seems to work fine for us, assigning the onmessage after the socket is created: channel = new goog.appengine.Channel(token); socket = channel.open(); socket.onmessage = onMessage; ...

Getting gcloud to work in Cygwin Windows

python,windows,google-app-engine,cygwin

First: Cygwin 32? Do you have a 32bit machine? Otherwise the 64bit Version will be the better choice! Please have a look here, if you DIDN'T install python via cygwin: Using python on windows If you DID install it via cygwin: Set up python on windows You might also have...

Polymer & google cloud endpoints golang backend

google-app-engine,polymer,google-cloud-endpoints

Some notes: google-client-loader is the one you want Until a new release you will have to depend on #master (as you are doing already) since the root/apiRoot fix hasn't been released yet . With Polymer 1.0 camel-cased attributes become lowercase so passing in apiRoot would actually be an apirootproperty. What...

AJAX call to Servlet Google App Engine (GAE)

java,ajax,jsp,google-app-engine,servlets

You cannot redirect using Ajax. That's the point of Ajax – it's asynchronous, separate from the "main thread". If you want to simply redirect either: Redirect in the Java code after doing some processing Have a link in the HTML – <a href="/register">Register!</a> If you definitely want to use JavaScript...

Profiling memory usage on App Engine

python,google-app-engine,memory

GAE Mini Profiler does provide memory stats if you use the sampling profiler and set memory_sample_rate nonzero; at each snapshot it will tell you the memory that was in use. You will want to turn the sample frequency way down as the memory sample takes a few ms to execute....

How to get google app engine admin mail address?

java,google-app-engine,email

I believe what you are looking for is the way to figure out the email id that is valid to send out mail from. You can figure out the appid dynamically using the App Identity API and construct the sender email id dynamically. https://cloud.google.com/appengine/docs/java/appidentity/ Once you have the appid you...

Check if a queue is empty in Google App Engine

python,django,google-app-engine,task-queue

You can use the QueueStatistics class statsList = taskqueue.QueueStatistics.fetch([taskqueue.Queue("foo"), taskqueue.Queue("bar")]) https://cloud.google.com/appengine/docs/python/taskqueue/queue_statistics#QueueStatistics_queue...

datastore - using queries and transactions

google-app-engine,gae-datastore

You can't do it with the entities you've set up, because between the time you queried for tasks, and inserted the new task, you can't guarantee that someone wouldn't have already inserted a new task that conflicts with the one you're inserting. Even if you use a transaction, any concurrently...

Google Appengine - Entity class is not enhanced

google-app-engine

I removed: /war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jar and also from my build path - problem solved....

How can I create a docker image from the current system?

google-app-engine,docker,boot2docker

You can SSH into the Container, make changes and then you can commit the container, which will save your changes to an image. You can now push this image to registry. Unless you are using a data container, all your changes are saved.

Objectify: Filter by an attribute of collection entries?

google-app-engine,collections,objectify

Assuming your list of ChallengeParticipant is reasonably bounded (a few hundred at most) and you aren't at risk of hitting the 1M per-entity size limit, you're probably best leaving it as embedded. To perform your query, first lookup the person by email, then filter by person: UserEntity user = //...

persisting relationships in datastore - app engine and objectify

java,google-app-engine,gae-datastore,objectify

There is no concept of "cascading save" in Objectify. If you want to save N entities, you must save them all explicitly. What You Save Is What You Save. From a performance perspective, this looks suboptimal. The GAE datastore likes fatter coarse-grained entities; your example requires four rounds of fetching...

Choosing specific ports on local development server for non-default modules

java,google-app-engine,android-studio,gradle,app-engine-modules

@crazystick answered it for Maven. Here's the same solution re-done for Gradle: apply plugin: ear ... appengine { downloadSdk = true httpAddress = "0.0.0.0" jvmFlags = ['-Dcom.google.appengine.devappserver_module.default.port=8080', '-Dcom.google.appengine.devappserver_module.module1.port=8081'] appcfg { email = "[email protected]" oauth2 = true } } ...

Seperating PHP and HTML [closed]

php,html,google-app-engine

It is perfectly fine to place your PHP code in the same file as your HTML code. However, if you are going to duplicate code, it would be best to have separate files (maybe say a header and footer file). That way you can use require_once("header.php") and require_once("footer.php") in each...

Fixing cursor issues in Web2Py on Google AppEngine?

python,google-app-engine,web2py

This issue was fixed by updating to Web2Py v2.11.2

Replacing the FileService Api to create a Blob file in server side

java,google-app-engine,gwt,google-cloud-storage,blobstore

Since the Blobstore is near to the permanent shutdown, you need to starts using Google Cloud Storage. The Google Cloud Storage Client Library is fully integrated for App Engine, making easy the migration to another API. After you saved an object to Cloud Storage, you can generated a BlobKey starting...

Getting a 411 Length Required error when parameters are very long

java,angularjs,google-app-engine

The params argument you are using is used to pass GET variables as part of the url even when method is POST ($http docs). To pass information in the body of the POST request you have to use the data argument. So, your request should be: $http({ method: 'POST', url:...

Fetching entities from datastore where Entity.key.IN([keys…])

database,google-app-engine,app-engine-ndb,datastore

You definitely should use ndb.get_multi(unique_keys). It will fetch all keys asynchronously in a single batch.

I am working on small project with Google AppEngine (Python), tutored by Udacity. I am unable to render user comments to main page

python-2.7,google-app-engine,gae-datastore,jinja2

You've confused yourself with the way you've named your variables. You send the list of comments to the template as "comment", then iterate through that using "content" for each item, but then revert back to using "comment" instead. You should give your things logical names that reflects what they are....

Designing an API on top of BigQuery

google-app-engine,bigdata,google-bigquery

Based on my experience analyzing performance of similar projects in BigQuery. If you are concerned with performance only, then you don't have to change anything. BigQuery's optimizer can figure out many things, and if query uses WHERE against only few days - the performance will be good. But from billing...

Objectify list consistency in one entity

google-app-engine,gae-datastore,objectify

What I don't know is, can this list strong consistent? Consistency is determined by entity groups and queries, not properties. So if two users send a message at the same time, can it happens that the first user load the Topic, add his message, but in the same time...

GAE webapp2 delete all UserTokens (drop all sessios) for specific user

python,google-app-engine,webapp2

I see two ways how to do that. First is to inherit from the UserToken class making user an indexed property. Then you can set the token_model class property to your new token model in your user class. Here is the code: class MyToken(UserToken): user = ndb.StringProperty(required=True) class MyUser(User): token_model...

Sorry, unexpected error: 'module' object has no attribute 'SMTP_SSL'

python,google-app-engine,flask,flask-mail

You have set the MAIL_USE_SSL option to True: app.config['MAIL_USE_SSL'] = True which means that the Flask-Mail extension will want to use the smtplib.SMTP_SSL class, but that class isn't usually available on Google App Engine. That class is only available if the Python ssl module is available, which is only the...

How can you get the Google+ Profile of the current user when using Google Cloud Endpoint's (Java) built in authentication?

google-app-engine,google-plus,google-cloud-endpoints

It is possible to get the user access token when using Google Cloud Endpoint's built in authentication. Add the parameter HttpServletRequest request to your Google Cloud endpoint as shown below. This will allow you to get the raw request. You will then need to retreive the header called Authentication. This...

Google App Engine datastore: filter()

python,google-app-engine

object.__nonzero__: Called to implement truth value testing and the built-in operation bool(); should return False or True, or their integer equivalents 0 or 1. When this method is not defined, __len__() is called, if it is defined, and the object is considered true if its result is nonzero. If a...

What is the lifespan of a private variable in an GAE Endpoint class?

java,google-app-engine,variables,google-cloud-endpoints

A non-static variable is initialized for each thread. Several threads can be running on the same App Engine instance and your Cloud Endpoint service can be running on several instances in parallel. So let's say that given the current load, you Cloud Endpoint service is served through 3 instances I1,...

Google App Engine performance setting : Some performance settings must be changed via Module configuration files

java,google-app-engine

Google has disabled the performance panel. The only option left is to configure through appengine-web.xml. Thanks....

Flask - Trying to add an ID field in database which is incremented each time

python,google-app-engine,flask

Column is not a member sine you're not using SQLAlchemy. I think that Model from google.appengine.ext.db has some key out of the box, refer to google documentation...

Cloud Endpoints with Cloud SQL sample code

java,google-app-engine,google-cloud-endpoints,google-cloud-sql

Here is an example Cloud Endpoint class that updates Cloud SQL. The example assumes the end point is authenticated import java.io.IOException; import java.util.HashSet; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import com.google.api.server.spi.ServiceException; import com.google.api.server.spi.config.Api; import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.config.Named; import com.google.api.server.spi.response.ForbiddenException; import...

How many Async calls we can call in one request in Google App Engine

google-app-engine,asynchronous

There is no limit on the number of calls that App Engine can process in general. There are limits (quotas) set for different APIs: e.g. number of Mail API, Task API, URLFetch, etc. calls. Often quotas are different for paying customers, and in most cases you can request to increase...

How to get a response for a streaming url on google app engine (python)

python,google-app-engine,urllib2,urlfetch

UrlFetch is meant for fetching a finite resource from a URL, and generally doesn't play nice with streams. It's waiting for the request to terminate. I believe that the endpoint doesn't play well with Range requests in general. Look at the headers when my browser hits that stream (great stream...

Why google app engine stop auto scaling?

google-app-engine,autoscaling

Are you sure that your app engine is running out of resources for it to start auto scaling? JMeter is notorious for NOT scaling. Depending on the JVM settings and the machine's hardware capacity, JMeter's request per second could get pegged after a certain level. Make sure your JMeter instance...

GAE Managed VMs: Possible to use C-based Python libraries with standard runtime?

python,google-app-engine

The standard runtime is fine, you just need to add your extra dependencies to the Dockerfile that gets created. The tutorial in the docs (specifically Step 6) shows an example of building a python app that uses a C-extension.

Managed VM Background thread loses environment

python,multithreading,google-app-engine

application context is thread local in appengine when created through standard app handler. Remember the applications in appengine run in python27 with thread enabled already have threads. So each wsgi call then environment variables has to be thread local, or information would leak between handled requests. This means that additional...

Google Cloud Datastore PropertyFilter Error

php,google-app-engine,google-api,google-cloud-datastore,google-php-sdk

Solution: I did need to use the $query->setKinds() method as Ed Davisson suggested, however it cannot just take a string. You need to give it the Google_Service_Datastore_KindExpression Object Example: $views_kind= new Google_Service_Datastore_KindExpression; $views_kind->setName("views"); $query->setKinds(array($views_kind)); ...

No spreadsheets found when using AppIdentityService to authenticate

java,google-app-engine,google-spreadsheet-api

At the moment I believe AppIdentity is not supported when updating using the Sheets API from Google App Engine. It appears possible to authenticate, but the list of SpreadsheetEntrys is always empty. Instead, use the service account from Google App Engine by specifying the credentials in a GoogleCredential instance: GoogleCredential...

IllegalArgumentException: expected primitive class, but got: class UUID

android,google-app-engine,google-cloud-endpoints

I do understand why Google Api JSON parser was attempting to parse UUID as primitive, but at least I found a workaround to this issue. In my model class I kept field as UUID but changed getter to return String, now it looks like this: public String getId() { return...

How do I run a google appengine docker image on a compute engine instance?

python,google-app-engine,google-compute-engine

Running the application container standalone is possible, but there are a few nuances. Volume Bindings Firstly, let's look at the log directory part, where you create /var/log/appengine. When gcloud preview app run acts on the container, it actually runs it with volume bindings, that map /var/log/appengine within the container to...

How to upload images and storing it in db google app engine

python,google-app-engine,google-datastore

You can use the blobstore and a BlobReferenceProperty. class Image(db.Model): primary_image = blobstore.BlobReferenceProperty() Then you have an upload handler where you can add image using http post: class UploadHandler(BaseRequestHandler, blobstore_handlers.BlobstoreUploadHandler): def post(self): for upload in self.get_uploads(): try: img = Image() img.primary_image = upload.key() img.put() ...

Websocket port on google managed vm

google-app-engine,google-cloud-platform

This is currently expected behaviour of the appspot and custom domains front-end servers. Unfortunately, IP-of-instance is what you'll need for now, although I highly recommend you to star the relevant public issue tracker feature request thread, so that it gets higher priority and accelerates the appearance of a solution from...

Google datastore multiple values for the same property

android,google-app-engine,gae-datastore,google-datastore

It should be: List<String> members = new ArrayList<String>(3); members.add("A"); members.add("B"); members.add("C"); Entity newGroup = new Entity("group"); newGroup.setProperty("member", members); datastore.put(newGroup); ...

Delete ndb EntitiesByProperty index table

google-app-engine,indexing,gae-datastore,app-engine-ndb

Yes, you'll have to re-put all of your entities in order to update the values in the indexes (or remove them, as you're asking)

Arguments to Endpoints method change order

android,google-app-engine,google-cloud-endpoints

AS you can read here [1]: Method parameters in the generated client library are in alphabetical order, regardless of the original order in the backend method. As a result, you should be careful when editing your methods, especially if there are several parameters of the same type. The compiler will...

unindexed field in appengine search document?

google-app-engine,search

No, the full text search service is a search index, not a data repository, so by definition everything is indexed. You would probably struggle with this approach because the data types you put in are not necessarily what are stored, for example dates put in only have precision of a...

Architecture for cross platform messaging app

android,google-app-engine,backend,ejabberd,google-cloud-messaging

Announced last week: Engage your users across Android, iOS and Chrome via Google Cloud Messaging 3.0: https://developers.google.com/cloud-messaging/ https://www.youtube.com/watch?v=gJatfdattno ...

Is it possible to execute a task inside Google App Engine taskqueue?

google-app-engine,task-queue

You need to manually deque the task from the queue and post to the url with all the params. Check these doc https://cloud.google.com/appengine/docs/python/tools/localunittesting#Python_Writing_task_queue_tests http://googleappengine.googlecode.com/svn/trunk/python/google/appengine/api/taskqueue/taskqueue_stub.py

db.Model.all() returns an empty list

html,python-2.7,google-app-engine,gae-datastore,jinja2

Looks like you're being victim of Eventual Consistency: Consistency in the context of the GAE datastore, and in very simple, non-technical, terms, is 'availability of the latest copy of the data'. Perhaps a more intutive (but blatantly incorrect) definition would be the 'lack of lag between writes and reads'. Strongly...

viewing google app engine Python logging messages in CodeEnvy

python,google-app-engine,logging,cloud

When you use the logging library, the messages should be shown in Codenvy's console out of the box. To also see your custom logs in the Google Developers Console, You might have to supply logging.getLogger().setLevel(logging.DEBUG) import logging logging.getLogger().setLevel(logging.DEBUG) ... ... def get(self): logging.info('Starting feedback...') self.response.write('Processing form data...') feedback = self.request.get('content')...

jQuery ajax() success data - retrieving object results from Python server

jquery,python,ajax,google-app-engine,ajaxform

You need to JSON encode the data like Shaunak D described. The error you're getting is telling you that the json package doesn't know how encode your ajaxObject instance into a string. You can use a custom JSON encoder to fix this as detailed at https://docs.python.org/2/library/json.html (section "Extending JSONEncoder") Alternatively...

GAE Python PyML ImportError: No module named _ckernel

python,google-app-engine,pyml

That code appears to be using swig. Appengine runtime sandbox limits 'c' based binary libs to a supported set. Swig typically implies compiled C/C++ wrapped in Python. So it would appear this can not run on appengine, unless they have a pure python option. You could run it under a...

Cannot log in to the MySQL server error when logging into phpmyadmin with Google Cloud SQL on Google App Engine

google-app-engine,phpmyadmin,google-cloud-sql

This was the problem: In the guide it says: // Change this to use the project and instance that you've created. $host = '/cloudsql/<your-project-id>:<your-cloudsql-instance>'; If you go to your Google Cloud SQL and view your GC-SQL instance, you will see that the instance ID is listed as <your-project-id>:<your-cloudsql-instance> So the...

How to get public link for the uploaded file on google cloud storage in local dev server(Google App engine+JAVA)

java,google-app-engine,file-upload,google-cloud-platform

You can use the Images service on the local devserver. For that you need a blobkey: BlobstoreService blobStore = BlobstoreServiceFactory.getBlobstoreService(); BlobKey blobKey = blobStore.createGsBlobKey("/gs/" + filename.getBucketName() + "/" + filename.getObjectName())); // blobKey can be persisted ImagesService imagesService = ImagesServiceFactory.getImagesService(); String url = imagesService.getServingUrl(ServingUrlOptions.Builder.withBlobKey(image)); Resizing also works on the local devserver...

Getting user credentials using Google+ API

android,google-app-engine,google-api,google-api-java-client

I have tried same code and its working fine! So, just ensure two things: 1)Register your digitally signed .apk file's public certificate in the Google APIs Console.Link below: https://developers.google.com/+/mobile/android/getting-started#step_1_enable_the_google_api 2)Make sure you have added the google+ api access and have client key created with SHA1. Rest is fine....

Python gdata API returning empty data with oauth2

python,google-app-engine,oauth

I sorted this out. There were a few things I had to do differently: Download the private key from Google as a p12 file. Convert the .p12 file I downloaded from Google into a pem file with the following command. The default password is 'notasecret'. openssl pkcs12 -in key.p12 -nodes...

How to use CachedRowSet in Google App Engine?

java,google-app-engine,jdbc,resultset,google-cloud-endpoints

CahecRowSet is an interface so obviously this is whitelisted. Interface CachedRowSet I am guessing you are connecting a Google CloudSQL instance. from the javadoc : A CachedRowSet object is a container for rows of data that caches its rows in memory, which makes it possible to operate without always being...

JPA PersistenceException: Class name could not be resolved

java,google-app-engine,jpa,gae-datastore

If the project name is TestProject, the query should be SELECT p FROM Project p WHERE p.projectName = 'TestProject' and not, as you are doing SELECT p FROM Project p WHERE p.projectName = TestProject All that wouldn't happen if you stopped using String concatenation to pass parameters to queries. This...

GAE python - client_secrets.json 'File not found' - app.yaml error?

python,json,google-app-engine,youtube-api,app.yaml

I was able to find an example online that I got to work, so I used those app.yaml settings in my project, which then worked. It would be nice for Google to post more complete examples, instead of clips from only the .py script. application: [your app name] version: 1...

Relationships in the Datastore (One-to-Many)

python,google-app-engine

What you have here is a many-to-many relationship as a project has many users and a user may be assigned to many projects (I assume). Using NDB we can try to forget about traditional database relationships and focus on the objects themselves. The simplest way to represent this is to...

Google App Engine PHP fetchAll(PDO::FETCH_ASSOC) doesn't work

php,google-app-engine,pdo,google-cloud-sql

I missed the step to set up Jenkins which is needed for push to deploy to function. However the supported language does not include PHP so I can't do much about it.

Do we HAVE to generate and use client libraries to use Google App Engine's Endpoints?

ios,swift,rest,google-app-engine,google-cloud-endpoints

Yes, it's totally possible to access endpoints via HTTP requests. The client libraries just help you to generate those requests without having to know the exact URLs. The biggest part where the client libraries help you is for authentication, but if you authenticate with Google and get an access token...

Trouble deleting entity with specific property set in Java GAE

java,google-app-engine,gae-datastore

Your Stocks entity has a property named "Name". That is not the same as the key name. You have to perform a query to get the entities or entity keys matching the filter of "Name=?". Something like this: public String deleteStockName(String stockName) { DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); Filter f =...

serving GAE applications over http

java,google-app-engine,ssl

There two things you've missed from docs: Google Cloud Endpoints requires SSL. If you need to access your backend API in a system not supporting SSL, you'll need to either update the system to support SSL or use a proxy. and Google Cloud Endpoints does not support custom domains. See...

Optimizing for Social Leaderboards

python,google-app-engine,optimization,twitter,leaderboard

I would organize the task like this: Make an asynchronous fetch call to the Twitter feed Use memcache to hold all the AuthAccount->User data: Request the data from memcache, if it doesn't exist then make a fetch_async() call to the AuthAccount to populate memcache and a local dict Run each...