google-app-engine

DownloadError: ApplicationError

I have a function called DownloadData() which uses url.fetch(). From time to time it throws DownloadError: ApplicationError: 2 timed out error. How can I catch this error? With "except DownloadError: ApplicationError: 2 timed " or only "DownloadError"? It is hard to reproduce this error so I can not know which except to use. Thanks,...

How can I implement a user name availability check on the google app engine?

When someone signs up for my website they must sign up with a unique user name. My current pseudocode for this is: if(datastore.nameIsAvailable(name)){ datastore.createUser(name); } How do I make sure that in between the time when nameIsAvailable returns true, and the createUser is finished, another instance of my app doesn't cre...

GAE/J: unable to register a custom ELResolver

I need to register a custom ELResolver for a Google App Engine project. Since it must be registered before any request is received, as specified by the Javadoc: It is illegal to register an ELResolver after the application has received any request from the client. If an attempt is made to register an ELResolver after that ti...

How do these user/userParam references relate to the Customer and Account lookups?

In the following code example how do the user/userParam references relate to the Customer and Account lookups and what is the relationship between Customer and Account? // PersistenceManager pm = ...; Transaction tx = pm.currentTransaction(); User user = userService.currentUser(); List<Account> accounts = new ArrayList<A...

GAE HTTP method support

I get an "unrecognized HTTP method" when trying to do a REPORT request using httplib and gae. Is there a workaround available? An httplib patch for gae? Do you I have to find another host in order to do this natively? According to the docs, only certain fetch actions are valid: GET, POST, HEAD, PUT, and DELETE: http://code.google.com/a...

How do I access session data in Jinja2 templates (Bottle framework on app engine)?

Hello! I'm running the micro framework Bottle on Google App Engine. I'm using Jinja2 for my templates. And I'm using Beaker to handle the sessions. I'm still a pretty big Python newbie and am pretty stoked I got this far :) My question is how do I access the session data within the templates? I can get the session data no problem w...

Sending emails from Django App

We are a growing Django app that is currently using Google Apps to send email. We are hitting the maximum limits of email sending and need a better solution. We prefer not to have to manage our own email servers and the easier the better. What is the best, easiest, and cheapest way to send a large amount of email? We have looked at Pos...

clojure maven configure

i had very nice dev. env. - clojure, maven and jetty with hot deploy. now i moved to google appengine and i can not figure out how to configure maven achieve hot deploy ...

can't open twitter using app engines urlfetch

i am trying to fetch the urls using google app engines urlFetch service and implement a proxy site.sites like twitter and and facebook appear disfigured as if they are missing the stylesheet ,even google is missing the google logo but yahoo opens all fine i can't understand why. ...

Netbeans Profiler failing for Google App Engine App

When I try to run the netbeans profiler on my app engine project it says: runserver-profile: [java] Error occurred during initialization of VM [java] Could not find agent library in absolute path: C:\Program BUILD FAILED Target "Files\NetBeans" does not exist in the project I'm not sure if this is because its an app engine p...

Google App Engine atomic section?

Say you retrieve a set of records from the datastore (something like: select * from MyClass where reserved='false'). how do i ensure that another user doesn't set the reserved is still false? I've looked in the Transaction documentation and got shocked from google's solution which is to catch the exception and retry in a loop. Any so...

Why declare "private List contactInfos" without a generic ("private List <ContactInfo> contactInfos") ?

In this example from the App Engine docs, why does the example declare contactInfos like this (no Generics): import javax.jdo.annotations.Element; // ... @Persistent @Element(dependent = "true") private List contactInfos; instead of like this, using a Generic: import javax.jdo.annotations.Element; // ... @Persistent ...

How do I change the default format of log messages in python app engine?

I would like to log the module and classname by default in log messages from my request handlers. The usual way to do this seems to be to set a custom format string by calling logging.basicConfig, but this can only be called once and has already been called by the time my code runs. Another method is to create a new log Handler which c...

Is getServletContext() officially supported in GAE?

Is getServletContext() officially supported in GAE? is it ok if servers are distributed among diff locations? performance? could I use 'synchronize' within the doPost or in a task queue before updating a value in the context? ...

What is a good SOAP client library for python on App Engine?

I have read that SUDS doesn't work on App Engine. http://osdir.com/ml/fedora-suds-list/2010-03/msg00004.html Can anyone confirm or refute this? Can you suggest an alternative for calling SOAP services from App Engine's python runtime? ...

How long (max characters) can a datastore entity key_name be? Is it bad to haver very long key_names?

What is the maximum number of characters that can be used to define the key_name of a datastore entity? Is it bad to have very long key_names? For example: Lets say we use key_names of a 170 characters, which is the length of a Twitter message 140 plus 10 numeric characters for latitude and 10 for longtitude and 10 for a timestamp. ...

Is a JID a user identifier as well as an application address?

In the App Engine docs, a JID is defined like this: An application can send and receive messages using several kinds of addresses, or "JIDs." On Wikipedia, however, a JID is defined like this: Every user on the (XMPP) network has a unique Jabber ID (usually abbreviated as JID). So, a JID is both a user identifier and ...

Is there a way to configure a custom domain so that it forwards XMPP messages to an App Engine app?

App Engine only allows you to use these formats for XMPP addresses: [email protected] [email protected] Is there be a way to configure a custom domain so that it forwards XMPP messages to one of these address formats. For example, if my domain is called myxmpp.com, I could give that out to users as my application's JID...

Porting from GAE to TomCat or another servlet server

Hi guys, I'm unhappy from GAE because - One can't have a global variable and the 'synchronize' keyword. Instead one have to catch a basically DB transcational exception and retry in a while loop - which will eat all my free CPU time and will start costing me money as I reach the google's qouata. Is it safe to use synchronize inside ...

In datastore, confused on how to pass a list of key_names as an argument to somemodel.get_or_insert() ?

Are there examples of how to pass a list of key_names to Model.get_or_insert() ? My Problem: With a method of ParentLayer I want to make the children. The key_names of the new (or editable) entities of class Child will come from such a list below: namesList = ["picture1","picture2"] so I should be able to build a list of key_names...