Posted by & filed under Tech.

We run the Rogerthat mobile communication platform on top of Google App Engine. Some time ago we upgraded from Python2.5 to Python2.7, which gives us multi-threading and other useful features.

However, an annoying bug makes it hard to run the Google App Engine development server on Linux or Mac OS X. When starting up the server, you get lots of HTTP error 500, and your logs show errors similar to:

WARNING  2012-12-07 13:04:52,994] Can't open zipfile

IOError: [Errno 13] file not accessible:

This is due to a bug in the Google App Engine SDK. The fix is:

  • Edit the file <local path to app engine>/google/appengine/tools/
    • On my system the local path to App Engine is /usr/local/google_appengine
  • Search for py27_optional=False and replace it by py27_optional=True (I had 2 matches)

Your problems should be solved. Every time you update your local App Engine SDK, you will need to redo this patch.

To run the development server with Python 2.7, we use the following script which sets up a high replication datastore, has unbuffered Python output, captures everything in a log file and streams to stdout. You should replace the path to with the one on your system:

python2.7 -u /usr/local/google_appengine/ src/ --address --port 8080 --datastore_path=tmp/datastore --history_path=tmp/datastore_history --high_replication --use_sqlite --skip_sdk_update_check 2>&1 | tee -a tmp/appengine.log

Leave a Reply